Changeset View
Changeset View
Standalone View
Standalone View
kstyle/oxygen.h
Show All 25 Lines | |||||
26 | #include <QWeakPointer> | 26 | #include <QWeakPointer> | ||
27 | 27 | | |||
28 | namespace Oxygen | 28 | namespace Oxygen | ||
29 | { | 29 | { | ||
30 | 30 | | |||
31 | //*@name convenience typedef | 31 | //*@name convenience typedef | ||
32 | //@{ | 32 | //@{ | ||
33 | 33 | | |||
34 | #if QT_VERSION >= 0x050000 | | |||
35 | //* scoped pointer convenience typedef | 34 | //* scoped pointer convenience typedef | ||
36 | template <typename T> using WeakPointer = QPointer<T>; | 35 | template <typename T> using WeakPointer = QPointer<T>; | ||
37 | #else | | |||
38 | //* scoped pointer convenience typedef | | |||
39 | template <typename T> using WeakPointer = QWeakPointer<T>; | | |||
40 | #endif | | |||
41 | 36 | | |||
42 | //* scoped pointer convenience typedef | 37 | //* scoped pointer convenience typedef | ||
43 | template <typename T> using ScopedPointer = QScopedPointer<T, QScopedPointerPodDeleter>; | 38 | template <typename T> using ScopedPointer = QScopedPointer<T, QScopedPointerPodDeleter>; | ||
44 | 39 | | |||
45 | //* disable QStringLiteral for older Qt version | | |||
46 | #if QT_VERSION < 0x050000 | | |||
47 | using QStringLiteral = QString; | | |||
48 | #endif | | |||
49 | | ||||
50 | //@} | 40 | //@} | ||
51 | 41 | | |||
52 | //* metrics | 42 | //* metrics | ||
53 | /*! these are copied from the old KStyle WidgetProperties */ | 43 | /*! these are copied from the old KStyle WidgetProperties */ | ||
54 | enum Metrics | 44 | enum Metrics | ||
55 | { | 45 | { | ||
56 | // frames | 46 | // frames | ||
57 | Frame_FrameWidth = 2, | 47 | Frame_FrameWidth = 2, | ||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |