[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [oxygen] liboxygen: fixed compilation for kde4
From: Hugo Pereira Da Costa <hugo.pereira () free ! fr>
Date: 2016-03-30 13:52:25
Message-ID: E1alGXp-0001OU-Gi () scm ! kde ! org
[Download RAW message or body]
Git commit 4b0f6db7821964b6e4ea237a765c1cd999ad01ab by Hugo Pereira Da Costa.
Committed on 30/03/2016 at 13:51.
Pushed by hpereiradacosta into branch 'master'.
fixed compilation for kde4
it is achieved by backporting WeakPointer definition from breeze and use it
for animations.
M +9 -0 liboxygen/liboxygen.h
M +3 -1 liboxygen/oxygenanimation.h
http://commits.kde.org/oxygen/4b0f6db7821964b6e4ea237a765c1cd999ad01ab
diff --git a/liboxygen/liboxygen.h b/liboxygen/liboxygen.h
index e7e4790..20d1b86 100644
--- a/liboxygen/liboxygen.h
+++ b/liboxygen/liboxygen.h
@@ -21,10 +21,19 @@
*************************************************************************/
#include <QFlags>
+#include <QWeakPointer>
namespace Oxygen
{
+ #if QT_VERSION >= 0x050000
+ //* scoped pointer convenience typedef
+ template <typename T> using WeakPointer = QPointer<T>;
+ #else
+ //* scoped pointer convenience typedef
+ template <typename T> using WeakPointer = QWeakPointer<T>;
+ #endif
+
//* disable QStringLiteral for older Qt version
#if QT_VERSION < 0x050000
using QStringLiteral = QString;
diff --git a/liboxygen/oxygenanimation.h b/liboxygen/oxygenanimation.h
index 172ea06..732a734 100644
--- a/liboxygen/oxygenanimation.h
+++ b/liboxygen/oxygenanimation.h
@@ -32,6 +32,8 @@
#include "oxygen_export.h"
+#include "liboxygen.h"
+
namespace Oxygen
{
@@ -43,7 +45,7 @@ namespace Oxygen
public:
//! TimeLine shared pointer
- typedef QPointer<Animation> Pointer;
+ using Pointer = WeakPointer<Animation>;
//! constructor
Animation( int duration, QObject* parent ):
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic