Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on Ubuntu 20.04 LTS #75

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ set(Icon_Resource exe/fstl.rc)
set(OpenGL_GL_PREFERENCE GLVND)

#find required packages.
find_package(Qt5 5.14 REQUIRED COMPONENTS Core Gui Widgets OpenGL)
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets OpenGL)
find_package(OpenGL REQUIRED)
find_package(Threads REQUIRED)

Expand Down
10 changes: 5 additions & 5 deletions src/canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,23 +278,23 @@ void Canvas::wheelEvent(QWheelEvent *event)
{
// Find GL position before the zoom operation
// (to zoom about mouse cursor)
auto p = event->position();
auto p = event->pos();
QVector3D v(1 - p.x() / (0.5*width()),
p.y() / (0.5*height()) - 1, 0);
QVector3D a = transform_matrix().inverted() *
view_matrix().inverted() * v;

if (event->angleDelta().y() < 0)
if (event->delta() < 0)
{
for (int i=0; i > event->angleDelta().y(); --i)
for (int i=0; i > event->delta(); --i)
if (invertZoom)
zoom /= 1.001;
else
zoom *= 1.001;
}
else if (event->angleDelta().y() > 0)
else if (event->delta() > 0)
{
for (int i=0; i < event->angleDelta().y(); ++i)
for (int i=0; i < event->delta(); ++i)
if (invertZoom)
zoom *= 1.001;
else
Expand Down
6 changes: 3 additions & 3 deletions src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ void Window::build_folder_file_list()
QPair<QString, QString> Window::get_file_neighbors()
{
if (current_file.isEmpty()) {
return QPair<QString, QString>(QString(), QString());
return QPair<QString, QString>(QString::null, QString::null);
}

build_folder_file_list();
Expand All @@ -476,8 +476,8 @@ QPair<QString, QString> Window::get_file_neighbors()
QString current_dir = fileInfo.absoluteDir().absolutePath();
QString current_name = fileInfo.fileName();

QString prev = QString();
QString next = QString();
QString prev = QString::null;
QString next = QString::null;

QListIterator<QString> fileIterator(lookup_folder_files);
while (fileIterator.hasNext()) {
Expand Down