Skip to content

Commit

Permalink
Revert "Fix several Qt deprecation warnings (fstl-app#67)"
Browse files Browse the repository at this point in the history
This reverts commit 18e0e59.
  • Loading branch information
Lenbok committed Sep 4, 2021
1 parent 843415d commit ee1e830
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
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

0 comments on commit ee1e830

Please sign in to comment.