diff options
author | Stefan Hacker <dd0t@users.sourceforge.net> | 2014-08-22 03:55:34 +0400 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2014-08-22 03:55:34 +0400 |
commit | 12eb26431f03f5ed3c634d647b1581572039112d (patch) | |
tree | a827af54d07919cae8cce5135d5652c76537156c /src/murmur | |
parent | 4efabcea5c5f6aff6de5d69500044429e8d9c053 (diff) |
Replace all uses of QT_VERSION_CHECK with explicit version.
Qt4's moc is not able to expand QT_VERSION_CHECK which may lead
to invalid codegen when used for backwards compatibility work.
Replaced all occurances with explicit check against numeric
version which are treated correctly. Even though bad interactions
might be rare we should no longer use this macro as long as we
want to compile with Qt 4. Also see:
http://lists.qt-project.org/pipermail/interest/2013-August/008351.html
Diffstat (limited to 'src/murmur')
-rw-r--r-- | src/murmur/Cert.cpp | 2 | ||||
-rw-r--r-- | src/murmur/Meta.cpp | 2 | ||||
-rw-r--r-- | src/murmur/Server.cpp | 6 | ||||
-rw-r--r-- | src/murmur/Tray.h | 2 | ||||
-rw-r--r-- | src/murmur/main.cpp | 8 | ||||
-rw-r--r-- | src/murmur/murmur_pch.h | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/src/murmur/Cert.cpp b/src/murmur/Cert.cpp index 2f2c36f74..cf08ebfb1 100644 --- a/src/murmur/Cert.cpp +++ b/src/murmur/Cert.cpp @@ -117,7 +117,7 @@ void Server::initializeCert() { } QString issuer; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 QStringList issuerNames = qscCert.issuerInfo(QSslCertificate::CommonName); if (! issuerNames.isEmpty()) { issuer = issuerNames.first(); diff --git a/src/murmur/Meta.cpp b/src/murmur/Meta.cpp index e15834c12..4bd0bbbe4 100644 --- a/src/murmur/Meta.cpp +++ b/src/murmur/Meta.cpp @@ -125,7 +125,7 @@ void MetaParams::read(QString fname) { QStringList datapaths; #if defined(Q_OS_WIN) -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 datapaths << QStandardPaths::writableLocation(QStandardPaths::DataLocation); #else datapaths << QDesktopServices::storageLocation(QDesktopServices::DataLocation); diff --git a/src/murmur/Server.cpp b/src/murmur/Server.cpp index dce502c11..3bdccdb1f 100644 --- a/src/murmur/Server.cpp +++ b/src/murmur/Server.cpp @@ -1148,7 +1148,7 @@ void Server::newClient() { u->setToS(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 sock->setProtocol(QSsl::TlsV1_0); #else sock->setProtocol(QSsl::TlsV1); @@ -1176,14 +1176,14 @@ void Server::encrypted() { QList<QSslCertificate> certs = uSource->peerCertificateChain(); if (!certs.isEmpty()) { const QSslCertificate &cert = certs.last(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 uSource->qslEmail = cert.subjectAlternativeNames().values(QSsl::EmailEntry); #else uSource->qslEmail = cert.alternateSubjectNames().values(QSsl::EmailEntry); #endif uSource->qsHash = cert.digest(QCryptographicHash::Sha1).toHex(); if (! uSource->qslEmail.isEmpty() && uSource->bVerified) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 QString subject; QString issuer; diff --git a/src/murmur/Tray.h b/src/murmur/Tray.h index 5ceb407d6..6dd4220dc 100644 --- a/src/murmur/Tray.h +++ b/src/murmur/Tray.h @@ -34,7 +34,7 @@ #include <QtCore/QStringList> #include <QtCore/QObject> -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 # include <QtWidgets/QSystemTrayIcon> #else # include <QtGui/QSystemTrayIcon> diff --git a/src/murmur/main.cpp b/src/murmur/main.cpp index 5c31872af..a004399a4 100644 --- a/src/murmur/main.cpp +++ b/src/murmur/main.cpp @@ -154,7 +154,7 @@ static void murmurMessageOutput(QtMsgType type, const char *msg) { murmurMessageOutputQString(type, QString::fromUtf8(msg)); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 static void murmurMessageOutputWithContext(QtMsgType type, const QMessageLogContext &ctx, const QString &msg) { Q_UNUSED(ctx); murmurMessageOutputQString(type, msg); @@ -210,7 +210,7 @@ int main(int argc, char **argv) { a.setOrganizationDomain("mumble.sourceforge.net"); QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION < 0x050000 QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); #endif @@ -239,7 +239,7 @@ int main(int argc, char **argv) { #endif qsrand(QDateTime::currentDateTime().toTime_t()); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 qInstallMessageHandler(murmurMessageOutputWithContext); #else qInstallMsgHandler(murmurMessageOutput); @@ -530,7 +530,7 @@ int main(int argc, char **argv) { delete meta; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 qInstallMessageHandler(NULL); #else qInstallMsgHandler(NULL); diff --git a/src/murmur/murmur_pch.h b/src/murmur/murmur_pch.h index 456e42b87..0eeaee205 100644 --- a/src/murmur/murmur_pch.h +++ b/src/murmur/murmur_pch.h @@ -26,7 +26,7 @@ #ifdef Q_OS_WIN #include <QtGui/QtGui> -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= 0x050000 # include "Qt4Compat.h" # include <QtWidgets/QtWidgets> #endif |