Skip to content

Commit

Permalink
Merge pull request mixxxdj#2168 from uklotzde/qt5_cleanup
Browse files Browse the repository at this point in the history
Qt5: Version check cleanup
  • Loading branch information
daschuer authored Jun 15, 2019
2 parents db0eb83 + 9689e9d commit 562a599
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ install:
# Build flags common to OS X and Linux.
# Parallel builds are important for avoiding OSX build timeouts.
# We turn off verbose output to avoid going over the 4MB output limit.
- export COMMON="-j4 qt5=1 test=1 mad=1 faad=1 ffmpeg=1 opus=1 modplug=1 wv=1 hss1394=0 virtualize=0 debug_assertions_fatal=1 verbose=0"
- export COMMON="-j4 test=1 mad=1 faad=1 ffmpeg=1 opus=1 modplug=1 wv=1 hss1394=0 virtualize=0 debug_assertions_fatal=1 verbose=0"

#####
# Ubuntu Trusty Build
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/controllerdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ControllerDebug {
// In order of Bug #1797746, since transition to qt5 it is needed unquote the
// output for mixxx.log with .noquote(), because in qt5 QDebug() is quoted by default.

#if QT_VERSION > 0x050399
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)

#define controllerDebug(stream) \
{ \
Expand Down
5 changes: 0 additions & 5 deletions src/util/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
#include <QThread>
#include <QtDebug>
#include <QtGlobal>

#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
#include <QLoggingCategory>
#endif

#include "controllers/controllerdebug.h"
#include "util/assert.h"
Expand Down Expand Up @@ -198,7 +195,6 @@ void Logging::initialize(const QDir& settingsDir,
// Install the Qt message handler.
qInstallMessageHandler(MessageHandler);

#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
// Ugly hack around distributions disabling debugging in Qt applications.
// This restores the default Qt behavior. It is required for getting useful
// logs from users and for developing controller mappings.
Expand All @@ -207,7 +203,6 @@ void Logging::initialize(const QDir& settingsDir,
// Ubuntu: https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1731646
QLoggingCategory::setFilterRules("*.debug=true\n"
"qt.*.debug=false");
#endif
}

// static
Expand Down
20 changes: 0 additions & 20 deletions src/util/widgethider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,6 @@ WidgetHider::WidgetHider(QObject* parent)
: QObject(parent) {
}

#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
bool WidgetHider::eventFilter(QObject*, QEvent* ev) {
return ev->type() == QEvent::Paint;
}

void WidgetHider::retainSizeFor(QWidget* widget) {
Q_UNUSED(widget);
}

void WidgetHider::hideWidget(QWidget* w) {
w->installEventFilter(this);
w->update();
}

void WidgetHider::showWidget(QWidget* w) {
w->removeEventFilter(this);
w->update();
}
#else
bool WidgetHider::eventFilter(QObject* watched, QEvent* event) {
return QObject::eventFilter(watched,event);
}
Expand All @@ -44,4 +25,3 @@ void WidgetHider::showWidget(QWidget* widget)
{
widget->setVisible(true);
}
#endif

0 comments on commit 562a599

Please sign in to comment.