Skip to content

Commit

Permalink
Fixes for Qt6 and MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
novomesk committed Jun 30, 2024
1 parent 40aa26e commit efd0242
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ImageLounge/src/DkCore/DkActionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void DkAppManager::assignIcon(QAction *app) const
return;
}

QFileInfo file = app->toolTip();
QFileInfo file(app->toolTip());

if (!file.exists())
return;
Expand Down
2 changes: 1 addition & 1 deletion ImageLounge/src/DkCore/DkImageLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ bool DkImageLoader::loadZipArchive(const QString &zipPath)
QFileInfoList fileInfoList;
// encode both the input zip file and the output image into a single fileInfo
for (const QString &filePath : fileList)
fileInfoList.append(DkZipContainer::encodeZipFile(zipPath, filePath));
fileInfoList.append(QFileInfo(DkZipContainer::encodeZipFile(zipPath, filePath)));

QFileInfo zipInfo(zipPath);

Expand Down
6 changes: 3 additions & 3 deletions ImageLounge/src/DkGui/DkNoMacs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
#include <winsock2.h> // needed since libraw 0.16
#endif

#ifdef Q_OS_WIN
#if defined(Q_OS_WIN) && (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
#include <QWinTaskbarButton>
#endif

Expand Down Expand Up @@ -1127,7 +1127,7 @@ void DkNoMacs::openFile()

if (!dup) {
// > 1: only open in tab if more than one file is opened
bool newTab = filePaths.size() > 1 | getTabWidget()->getTabs().size() > 1;
bool newTab = (filePaths.size() > 1) || (getTabWidget()->getTabs().size() > 1);
getTabWidget()->loadFile(fp, newTab);
}
}
Expand Down Expand Up @@ -1584,7 +1584,7 @@ void DkNoMacs::onWindowLoaded()
getTabWidget()->loadSettings();

// init global taskbar
#ifdef WIN32
#if defined(Q_OS_WIN) && (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QWinTaskbarButton *button = new QWinTaskbarButton(this);
button->setWindow(windowHandle());

Expand Down

0 comments on commit efd0242

Please sign in to comment.