Permalink
Browse files

Qt5 compatibility fixes.

  • Loading branch information...
1 parent 74aabda commit d9ac417640bcb56b8a3b58557a301bd40a484dc1 @daniel-kristjansson daniel-kristjansson committed Jun 14, 2012
View
4 mythtv/configure
@@ -3681,10 +3681,10 @@ if ! is_qmake5 $qmake ; then
if ! expr $($qmake -query QT_VERSION) : "4\.[6-9]\.[0-9]" >/dev/null; then
die "Qt4.6 or newer is required to build MythTV."
fi
+else
+ check_cxxflags -DHAVE_QT5
fi
-echo qmake: $qmake
-
enabled pic && enable_pic
check_cc <<EOF || die "Symbol mangling check failed."
View
4 mythtv/libs/libmythui/mythmainwindow.cpp
@@ -1605,7 +1605,7 @@ void MythMainWindow::BindKey(const QString &context, const QString &action,
if (!d->keyContexts.contains(context))
d->keyContexts.insert(context, new KeyContext());
- for (unsigned int i = 0; i < keyseq.count(); i++)
+ for (unsigned int i = 0; i < (uint)keyseq.count(); i++)
{
int keynum = keyseq[i];
keynum &= ~Qt::UNICODE_ACCEL;
@@ -1752,7 +1752,7 @@ void MythMainWindow::BindJump(const QString &destination, const QString &key)
QKeySequence keyseq(key);
- for (unsigned int i = 0; i < keyseq.count(); i++)
+ for (unsigned int i = 0; i < (uint)keyseq.count(); i++)
{
int keynum = keyseq[i];
keynum &= ~Qt::UNICODE_ACCEL;
View
1 mythtv/libs/libmythui/mythpainter_vdpau.cpp
@@ -5,7 +5,6 @@
#include <QCoreApplication>
#include <QPainter>
#include <QMutex>
-#include <QX11Info>
// Mythdb headers
#include "mythlogging.h"
View
6 mythtv/libs/libmythui/mythrender_base.h
@@ -28,7 +28,11 @@ class MythRender : public ReferenceCounter
/// Warning: The reference count can be decremented between
/// the call to this function and the use of it's value.
- bool IsShared(void) const { return m_referenceCount > 1; }
+ bool IsShared(void) const
+ {
+ return const_cast<QAtomicInt&>(m_referenceCount)
+ .fetchAndAddOrdered(0) > 1;
+ }
RenderType Type(void) const { return m_type; }
bool IsErrored(void) const { return m_errored; }
View
1 mythtv/libs/libmythui/screensaver-x11.cpp
@@ -4,7 +4,6 @@
// QT headers
#include <QDateTime>
#include <QTimer>
-#include <QX11Info>
// Mythdb headers
#include "mythlogging.h"

0 comments on commit d9ac417

Please sign in to comment.