Change Q_WS_WIN to Q_OS_WIN

Q_WS_* macroses were removed from Qt5.
Use Q_OS_* instead.
This commit is contained in:
Aleksandr Pikalev 2015-10-05 22:39:46 +03:00 committed by PKEuS
parent b634a76fcb
commit f239057e33
2 changed files with 5 additions and 5 deletions

View File

@ -53,11 +53,11 @@ ApplicationDialog::~ApplicationDialog()
void ApplicationDialog::Browse()
{
QString filter;
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
// In Windows (almost) all executables have .exe extension
// so it does not make sense to show everything.
filter += tr("Executable files (*.exe);;All files(*.*)");
#endif // Q_WS_WIN
#endif // Q_OS_WIN
QString selectedFile = QFileDialog::getOpenFileName(this,
tr("Select viewer application"),
GetPath(SETTINGS_LAST_APP_PATH),

View File

@ -624,7 +624,7 @@ void ResultsTree::StartApplication(QStandardItem *target, int application)
//Replace (file) with filename
QString file = data["file"].toString();
file = QDir::toNativeSeparators(file);
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
file.replace(QString("\\"), QString("\\\\"));
#endif
qDebug() << "Opening file: " << file;
@ -667,14 +667,14 @@ void ResultsTree::StartApplication(QStandardItem *target, int application)
QString program = app.getPath();
// In Windows we must surround paths including spaces with quotation marks.
#ifdef Q_WS_WIN
#ifdef Q_OS_WIN
if (program.indexOf(" ") > -1) {
if (!program.startsWith('"') && !program.endsWith('"')) {
program.insert(0, "\"");
program.append("\"");
}
}
#endif // Q_WS_WIN
#endif // Q_OS_WIN
const QString cmdLine = QString("%1 %2").arg(program).arg(params);