Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Qt5 compatibility fixes.
  • Loading branch information
daniel-kristjansson committed Jun 14, 2012
1 parent 74aabda commit d9ac417
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mythtv/configure
Expand Up @@ -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."
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythmainwindow.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythui/mythpainter_vdpau.cpp
Expand Up @@ -5,7 +5,6 @@
#include <QCoreApplication>
#include <QPainter>
#include <QMutex>
#include <QX11Info>

// Mythdb headers
#include "mythlogging.h"
Expand Down
6 changes: 5 additions & 1 deletion mythtv/libs/libmythui/mythrender_base.h
Expand Up @@ -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; }
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythui/screensaver-x11.cpp
Expand Up @@ -4,7 +4,6 @@
// QT headers
#include <QDateTime>
#include <QTimer>
#include <QX11Info>

// Mythdb headers
#include "mythlogging.h"
Expand Down

0 comments on commit d9ac417

Please sign in to comment.