Changeset View
Changeset View
Standalone View
Standalone View
scripting/workspace_wrapper.cpp
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | 107 | if (!Activities::self()) { | |||
---|---|---|---|---|---|
108 | return QString(); | 108 | return QString(); | ||
109 | } | 109 | } | ||
110 | return Activities::self()->current(); | 110 | return Activities::self()->current(); | ||
111 | #else | 111 | #else | ||
112 | return QString(); | 112 | return QString(); | ||
113 | #endif | 113 | #endif | ||
114 | } | 114 | } | ||
115 | 115 | | |||
116 | void WorkspaceWrapper::setCurrentActivity(QString activity) | ||||
117 | { | ||||
118 | #ifdef KWIN_BUILD_ACTIVITIES | ||||
119 | if (Activities::self()) { | ||||
120 | Activities::self()->setCurrent(activity); | ||||
121 | } | ||||
122 | #else | ||||
123 | Q_UNUSED(activity) | ||||
zzag: Could you please remove the semicolon. The Q_UNUSED macro is defined as `#define Q_UNUSED(x)… | |||||
124 | #endif | ||||
125 | } | ||||
126 | | ||||
116 | QStringList WorkspaceWrapper::activityList() const | 127 | QStringList WorkspaceWrapper::activityList() const | ||
117 | { | 128 | { | ||
118 | #ifdef KWIN_BUILD_ACTIVITIES | 129 | #ifdef KWIN_BUILD_ACTIVITIES | ||
119 | if (!Activities::self()) { | 130 | if (!Activities::self()) { | ||
120 | return QStringList(); | 131 | return QStringList(); | ||
121 | } | 132 | } | ||
122 | return Activities::self()->all(); | 133 | return Activities::self()->all(); | ||
123 | #else | 134 | #else | ||
▲ Show 20 Lines • Show All 263 Lines • Show Last 20 Lines |
Could you please remove the semicolon. The Q_UNUSED macro is defined as #define Q_UNUSED(x) (void)x; so you don't need to put semicolon and I think Qt Creator will print a warning.