From 42598a20c9bd608060091f0cfaaab7d73f35d5de Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Mon, 3 Aug 2015 14:23:16 +0200 Subject: [PATCH] Added APP_LINUX define --- minitube.pro | 8 ++++++-- src/painterutils.cpp | 6 ++---- src/temporary.cpp | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/minitube.pro b/minitube.pro index bc027d0..3f2d29f 100644 --- a/minitube.pro +++ b/minitube.pro @@ -1,6 +1,6 @@ CONFIG += release TEMPLATE = app -VERSION = 2.4 +VERSION = 2.5 DEFINES += APP_VERSION="$$VERSION" APP_NAME = Minitube @@ -14,7 +14,10 @@ DEFINES += APP_PHONON_SEEK DEFINES += APP_SNAPSHOT DEFINES += APP_YT3 -DEFINES *= QT_NO_DEBUG_OUTPUT +message(Building $${APP_NAME} $${VERSION}) +message(Qt $$[QT_VERSION] in $$[QT_INSTALL_PREFIX]) + +#DEFINES *= QT_NO_DEBUG_OUTPUT DEFINES *= QT_USE_QSTRINGBUILDER DEFINES *= QT_STRICT_ITERATORS @@ -188,6 +191,7 @@ include(locale/locale.pri) # deploy DISTFILES += CHANGES COPYING unix:!mac { + DEFINES += APP_LINUX qt:greaterThan(QT_MAJOR_VERSION, 4) { LIBS += -lphonon4qt5 INCLUDEPATH += /usr/include/phonon4qt5 diff --git a/src/painterutils.cpp b/src/painterutils.cpp index 097eac2..7e3be42 100644 --- a/src/painterutils.cpp +++ b/src/painterutils.cpp @@ -86,11 +86,9 @@ void PainterUtils::paintBadge(QPainter *painter, const QString &text, bool cente f.setHintingPreference(QFont::PreferNoHinting); #ifdef APP_MAC f.setFamily("Helvetica"); -#endif -#ifdef APP_WIN +#elif APP_WIN rect.adjust(0, -2, 0, 0); -#endif -#ifdef Q_OS_LINUX +#else rect.adjust(0, -1, 0, 0); #endif painter->save(); diff --git a/src/temporary.cpp b/src/temporary.cpp index 9c00215..913d244 100644 --- a/src/temporary.cpp +++ b/src/temporary.cpp @@ -23,7 +23,7 @@ $END_LICENSE */ #include "compatibility/pathsservice.h" static QList paths; -#ifdef Q_OS_LINUX +#ifdef APP_LINUX static QString userName; #endif @@ -34,7 +34,7 @@ QString Temporary::filename() { QString tempFile = tempDir + "/" + Constants::UNIX_NAME + "-" + QString::number(qrand()); -#ifdef Q_OS_LINUX +#ifdef APP_LINUX if (userName.isNull()) { userName = QString(getenv("USERNAME")); if (userName.isEmpty()) -- 2.39.5