Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt5: Version check cleanup #2168

Merged
merged 3 commits into from
Jun 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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