mirror of
https://github.com/YACReader/yacreader
synced 2025-07-21 06:24:39 -04:00
fix for issue #11 (Author mechtex)
This commit is contained in:
@ -17,7 +17,8 @@ DEFINES += SERVER_RELEASE NOMINMAX
|
||||
|
||||
win32 {
|
||||
|
||||
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32
|
||||
LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32
|
||||
|
||||
|
||||
isEqual(QT_MAJOR_VERSION, 5) {
|
||||
LIBS += -lpoppler-qt5
|
||||
|
@ -62,6 +62,10 @@
|
||||
|
||||
#include "QsLog.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <shellapi.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
//#include <QtMacExtras>
|
||||
#endif
|
||||
@ -1606,10 +1610,9 @@ QFileInfo file = QDir::cleanPath(currentPath() + dmCV->getComicPath(modelIndex))
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QString filePath = file.absoluteFilePath();
|
||||
QStringList args;
|
||||
args << "/select," << QDir::toNativeSeparators(filePath);
|
||||
QProcess::startDetached("explorer", args);
|
||||
QString filePath = file.absoluteFilePath();
|
||||
QString cmdArgs = QString("/select,\"") + QDir::toNativeSeparators(filePath) + QStringLiteral("\"");
|
||||
ShellExecuteW(0, L"open", L"explorer.exe", reinterpret_cast<LPCWSTR>(cmdArgs.utf16()), 0, SW_NORMAL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user