Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportUtils_p.h
- This file was copied to src/common/KReportUtils_p.cpp.
Show All 13 Lines | 1 | /* This file is part of the KDE project | |||
---|---|---|---|---|---|
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to | ||
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KREPORTUTILS_P_H | 20 | #ifndef KREPORTUTILS_P_H | ||
21 | #define KREPORTUTILS_P_H | 21 | #define KREPORTUTILS_P_H | ||
22 | | ||||
23 | #include <QApplication> | 22 | #include <QApplication> | ||
staniek: This include is needed in KReportUtils_p.cpp not here? | |||||
24 | 23 | | |||
25 | #include <KConfigGroup> | 24 | #include <KConfigGroup> | ||
26 | #include <KSharedConfig> | 25 | #include <KSharedConfig> | ||
27 | #include <KMessageBox> | 26 | #include <KMessageBox> | ||
28 | 27 | | |||
29 | #include <QCoreApplication> | 28 | #include <QCoreApplication> | ||
30 | #include <QDir> | 29 | #include <QDir> | ||
31 | #include <QFileInfo> | 30 | #include <QFileInfo> | ||
32 | #include <QRegularExpression> | 31 | #include <QRegularExpression> | ||
33 | #include <QResource> | 32 | #include <QResource> | ||
34 | #include <QStandardPaths> | 33 | #include <QStandardPaths> | ||
35 | #include <QDebug> | 34 | #include <QDebug> | ||
35 | #include <QGlobalStatic> | ||||
36 | | ||||
37 | #ifdef Q_WS_X11 | ||||
38 | #include <QX11Info> | ||||
39 | #else | ||||
40 | #include <QDesktopWidget> | ||||
41 | #endif | ||||
42 | | ||||
36 | 43 | | |||
37 | // This is a private code made inline for use in the lib and examples. | 44 | // This is a private code made inline for use in the lib and examples. | ||
38 | //! @todo Move to a shared lib to use in other Kexi libraries as well. | 45 | //! @todo Move to a shared lib to use in other Kexi libraries as well. | ||
39 | 46 | | |||
40 | namespace KReportPrivate { | 47 | namespace KReportPrivate { | ||
41 | 48 | | |||
42 | //! @todo Support other themes | 49 | //! @todo Support other themes | ||
43 | const QString supportedIconTheme = QLatin1String("breeze"); | 50 | const QString supportedIconTheme = QLatin1String("breeze"); | ||
44 | 51 | | |||
45 | //! @brief @return true if @a path is readable | 52 | //! @brief @return true if @a path is readable | ||
46 | bool fileReadable(const QString &path) | 53 | bool fileReadable(const QString &path); | ||
47 | { | | |||
48 | return !path.isEmpty() && QFileInfo(path).isReadable(); | | |||
49 | } | | |||
50 | 54 | | |||
51 | //! @brief Used for a workaround: locations for QStandardPaths::AppDataLocation end with app name. | 55 | //! @brief Used for a workaround: locations for QStandardPaths::AppDataLocation end with app name. | ||
52 | //! If this is not an expected app but for example a test app, replace | 56 | //! If this is not an expected app but for example a test app, replace | ||
53 | //! the subdir name with app name so we can find resource file(s). | 57 | //! the subdir name with app name so we can find resource file(s). | ||
54 | QStringList correctStandardLocations(const QString &privateName, | 58 | QStringList correctStandardLocations(const QString &privateName, | ||
55 | QStandardPaths::StandardLocation location, | 59 | QStandardPaths::StandardLocation location, | ||
56 | const QString &extraLocation) | 60 | const QString &extraLocation); | ||
57 | { | 61 | | ||
58 | QStringList result; | | |||
59 | if (!privateName.isEmpty()) { | | |||
60 | QRegularExpression re(QLatin1Char('/') + QCoreApplication::applicationName() + QLatin1Char('$')); | | |||
61 | QStringList standardLocations(QStandardPaths::standardLocations(location)); | | |||
62 | if (!extraLocation.isEmpty()) { | | |||
63 | standardLocations.append(extraLocation); | | |||
64 | } | | |||
65 | for(const QString &dir : standardLocations) { | | |||
66 | if (dir.indexOf(re) != -1) { | | |||
67 | QString realDir(dir); | | |||
68 | realDir.replace(re, QLatin1Char('/') + privateName); | | |||
69 | result.append(realDir); | | |||
70 | } | | |||
71 | } | | |||
72 | } | | |||
73 | return result; | | |||
74 | } | | |||
75 | 62 | | |||
76 | #ifdef Q_OS_WIN | | |||
77 | #define KPATH_SEPARATOR ';' | | |||
78 | #else | | |||
79 | #define KPATH_SEPARATOR ':' | | |||
80 | #endif | | |||
81 | 63 | | |||
82 | /*! @brief Locates a file path for specified parameters | 64 | /*! @brief Locates a file path for specified parameters | ||
83 | * @param privateName Name to be used instead of application name for resource lookup | 65 | * @param privateName Name to be used instead of application name for resource lookup | ||
84 | * @param path Relative path to the resource file | 66 | * @param path Relative path to the resource file | ||
85 | * @param location Standard file location to use for file lookup | 67 | * @param location Standard file location to use for file lookup | ||
86 | * @param extraLocation Extra directory path for file lookup | 68 | * @param extraLocation Extra directory path for file lookup | ||
87 | * @return Empty string on failure | 69 | * @return Empty string on failure | ||
88 | */ | 70 | */ | ||
89 | QString locateFile(const QString &privateName, | 71 | QString locateFile(const QString &privateName, | ||
90 | const QString& path, QStandardPaths::StandardLocation location, | 72 | const QString& path, QStandardPaths::StandardLocation location, | ||
91 | const QString &extraLocation) | 73 | const QString &extraLocation); | ||
92 | { | | |||
93 | // let QStandardPaths handle this, it will look for app local stuff | | |||
94 | QString fullPath = QFileInfo( | | |||
95 | QStandardPaths::locate(location, path)).canonicalFilePath(); | | |||
96 | if (fileReadable(fullPath)) { | | |||
97 | return fullPath; | | |||
98 | } | | |||
99 | | ||||
100 | // Try extra location | | |||
101 | fullPath = QFileInfo(extraLocation + QLatin1Char('/') + path).canonicalFilePath(); | | |||
102 | if (fileReadable(fullPath)) { | | |||
103 | return fullPath; | | |||
104 | } | | |||
105 | // Try in PATH subdirs, useful for running apps from the build dir, without installing | | |||
106 | for(const QByteArray &pathDir : qgetenv("PATH").split(KPATH_SEPARATOR)) { | | |||
107 | const QString dataDirFromPath = QFileInfo(QFile::decodeName(pathDir) + QStringLiteral("/data/") | | |||
108 | + path).canonicalFilePath(); | | |||
109 | if (fileReadable(dataDirFromPath)) { | | |||
110 | return dataDirFromPath; | | |||
111 | } | | |||
112 | } | | |||
113 | | ||||
114 | const QStringList correctedStandardLocations(correctStandardLocations(privateName, location, extraLocation)); | | |||
115 | for(const QString &dir : correctedStandardLocations) { | | |||
116 | fullPath = QFileInfo(dir + QLatin1Char('/') + path).canonicalFilePath(); | | |||
117 | if (fileReadable(fullPath)) { | | |||
118 | return fullPath; | | |||
119 | } | | |||
120 | } | | |||
121 | return QString(); | | |||
122 | } | | |||
123 | 74 | | |||
124 | /*! @brief Registers icons resource file | 75 | /*! @brief Registers icons resource file | ||
125 | * @param privateName Name to be used instead of application name for resource lookup | 76 | * @param privateName Name to be used instead of application name for resource lookup | ||
126 | * @param path Relative path to the resource file | 77 | * @param path Relative path to the resource file | ||
127 | * @param location Standard file location to use for file lookup | 78 | * @param location Standard file location to use for file lookup | ||
128 | * @param resourceRoot A resource root for QResource::registerResource() | 79 | * @param resourceRoot A resource root for QResource::registerResource() | ||
129 | * @param errorMessage On failure it is set to a brief error message. | 80 | * @param errorMessage On failure it is set to a brief error message. | ||
130 | * @param errorDescription On failure it is set to a detailed error message. | 81 | * @param errorDescription On failure it is set to a detailed error message. | ||
131 | * other for warning | 82 | * other for warning | ||
132 | */ | 83 | */ | ||
133 | bool registerIconsResource(const QString &privateName, const QString& path, | 84 | bool registerIconsResource(const QString &privateName, const QString& path, | ||
134 | QStandardPaths::StandardLocation location, | 85 | QStandardPaths::StandardLocation location, | ||
135 | const QString &resourceRoot, const QString &extraLocation, | 86 | const QString &resourceRoot, const QString &extraLocation, | ||
136 | QString *errorMessage, QString *detailedErrorMessage) | 87 | QString *errorMessage, QString *detailedErrorMessage); | ||
137 | { | | |||
138 | const QString fullPath = locateFile(privateName, path, location, extraLocation); | | |||
139 | if (fullPath.isEmpty() || !QFileInfo(fullPath).isReadable() | | |||
140 | || !QResource::registerResource(fullPath, resourceRoot)) | | |||
141 | { | | |||
142 | QStringList triedLocations(QStandardPaths::standardLocations(location)); | | |||
143 | if (!extraLocation.isEmpty()) { | | |||
144 | triedLocations.append(extraLocation); | | |||
145 | } | | |||
146 | triedLocations.append(correctStandardLocations(privateName, location, extraLocation)); | | |||
147 | const QString triedLocationsString = QLocale().createSeparatedList(triedLocations); | | |||
148 | #ifdef QT_ONLY | | |||
149 | *errorMessage = QString("Could not open icon resource file %1.").arg(path); | | |||
150 | *detailedErrorMessage = QString("Tried to find in %1.").arg(triedLocationsString); | | |||
151 | #else | | |||
152 | //! @todo 3.1 Re-add translation | | |||
153 | *errorMessage = /*QObject::tr*/ QString::fromLatin1( | | |||
154 | "Could not open icon resource file \"%1\". " | | |||
155 | "Application will not start. " | | |||
156 | "Please check if it is properly installed.") | | |||
157 | .arg(QFileInfo(path).fileName()); | | |||
158 | //! @todo 3.1 Re-add translation | | |||
159 | *detailedErrorMessage = QString::fromLatin1("Tried to find in %1.").arg(triedLocationsString); | | |||
160 | #endif | | |||
161 | return false; | | |||
162 | } | | |||
163 | *errorMessage = QString(); | | |||
164 | *detailedErrorMessage = QString(); | | |||
165 | return true; | | |||
166 | } | | |||
167 | 88 | | |||
168 | /*! @brief Registers a global icon resource file | 89 | /*! @brief Registers a global icon resource file | ||
169 | * @param themeName A name of icon theme to use. | 90 | * @param themeName A name of icon theme to use. | ||
170 | * @param errorMessage On failure it is set to a brief error message. | 91 | * @param errorMessage On failure it is set to a brief error message. | ||
171 | * @param errorDescription On failure it is set to a detailed error message. | 92 | * @param errorDescription On failure it is set to a detailed error message. | ||
172 | * other for warning | 93 | * other for warning | ||
173 | */ | 94 | */ | ||
174 | bool registerGlobalIconsResource(const QString &themeName, | 95 | bool registerGlobalIconsResource(const QString &themeName, | ||
175 | QString *errorMessage, | 96 | QString *errorMessage, | ||
176 | QString *detailedErrorMessage) | 97 | QString *detailedErrorMessage); | ||
177 | { | | |||
178 | QString extraLocation; | | |||
179 | #ifdef CMAKE_INSTALL_FULL_ICONDIR | | |||
180 | extraLocation = QDir::fromNativeSeparators(QFile::decodeName(CMAKE_INSTALL_FULL_ICONDIR)); | | |||
181 | if (extraLocation.endsWith("/icons")) { | | |||
182 | extraLocation.chop(QLatin1String("/icons").size()); | | |||
183 | } | | |||
184 | #elif defined(Q_OS_WIN) | | |||
185 | extraLocation = QCoreApplication::applicationDirPath() + QStringLiteral("/data"); | | |||
186 | #endif | | |||
187 | return registerIconsResource(QString(), QString::fromLatin1("icons/%1/%1-icons.rcc").arg(themeName), | | |||
188 | QStandardPaths::GenericDataLocation, | | |||
189 | QStringLiteral("/icons/") + themeName, | | |||
190 | extraLocation, errorMessage, | | |||
191 | detailedErrorMessage); | | |||
192 | } | | |||
193 | 98 | | |||
194 | /*! @brief Registers a global icon resource file | 99 | /*! @brief Registers a global icon resource file | ||
195 | * @param themeName A name of icon theme to use. | 100 | * @param themeName A name of icon theme to use. | ||
196 | */ | 101 | */ | ||
197 | bool registerGlobalIconsResource(const QString &themeName) | 102 | bool registerGlobalIconsResource(const QString &themeName); | ||
198 | { | | |||
199 | QString errorMessage; | | |||
200 | QString detailedErrorMessage; | | |||
201 | if (!registerGlobalIconsResource(themeName, &errorMessage, &detailedErrorMessage)) { | | |||
202 | if (detailedErrorMessage.isEmpty()) { | | |||
203 | KMessageBox::error(nullptr, errorMessage); | | |||
204 | } else { | | |||
205 | KMessageBox::detailedError(nullptr, errorMessage, detailedErrorMessage); | | |||
206 | } | | |||
207 | qWarning() << qPrintable(errorMessage); | | |||
208 | return false; | | |||
209 | } | | |||
210 | return true; | | |||
211 | } | | |||
212 | 103 | | |||
213 | /*! @brief Registers a global icon resource file for default theme name. | 104 | /*! @brief Registers a global icon resource file for default theme name. | ||
214 | */ | 105 | */ | ||
215 | bool registerGlobalIconsResource() | 106 | bool registerGlobalIconsResource(); | ||
216 | { | | |||
217 | return registerGlobalIconsResource(supportedIconTheme); | | |||
218 | } | | |||
219 | 107 | | |||
220 | /*! @brief Sets up a private icon resource file | 108 | /*! @brief Sets up a private icon resource file | ||
221 | * @return @c false on failure and sets error message. Does not warn or exit on failure. | 109 | * @return @c false on failure and sets error message. Does not warn or exit on failure. | ||
222 | * @param privateName Name to be used instead of application name for resource lookup | 110 | * @param privateName Name to be used instead of application name for resource lookup | ||
223 | * @param path Relative path to the resource file | 111 | * @param path Relative path to the resource file | ||
224 | * @param themeName Icon theme to use. It affects filename. | 112 | * @param themeName Icon theme to use. It affects filename. | ||
225 | * @param errorMessage On failure it is set to a brief error message | 113 | * @param errorMessage On failure it is set to a brief error message | ||
226 | * @param errorDescription On failure it is set to a detailed error message | 114 | * @param errorDescription On failure it is set to a detailed error message | ||
227 | * other for warning | 115 | * other for warning | ||
228 | * @param prefix Resource path prefix. The default is useful for library-global resource, | 116 | * @param prefix Resource path prefix. The default is useful for library-global resource, | ||
229 | * other values is useful for plugins. | 117 | * other values is useful for plugins. | ||
230 | */ | 118 | */ | ||
231 | bool setupPrivateIconsResource(const QString &privateName, const QString& path, | 119 | bool setupPrivateIconsResource(const QString &privateName, const QString& path, | ||
232 | const QString &themeName, | 120 | const QString &themeName, | ||
233 | QString *errorMessage, QString *detailedErrorMessage, | 121 | QString *errorMessage, QString *detailedErrorMessage, | ||
234 | const QString &prefix = QLatin1String(":/icons")) | 122 | const QString &prefix = QLatin1String(":/icons")); | ||
235 | { | | |||
236 | // Register application's resource first to have priority over the theme. | | |||
237 | // Some icons may exists in both resources. | | |||
238 | if (!registerIconsResource(privateName, path, | | |||
239 | QStandardPaths::AppDataLocation, | | |||
240 | QString(), QString(), errorMessage, detailedErrorMessage)) | | |||
241 | { | | |||
242 | return false; | | |||
243 | } | | |||
244 | bool changeTheme = false; | | |||
245 | #ifdef QT_GUI_LIB | | |||
246 | QIcon::setThemeSearchPaths(QStringList() << prefix << QIcon::themeSearchPaths()); | | |||
247 | changeTheme = 0 != QIcon::themeName().compare(themeName, Qt::CaseInsensitive); | | |||
248 | if (changeTheme) { | | |||
249 | QIcon::setThemeName(themeName); | | |||
250 | } | | |||
251 | #endif | | |||
252 | | ||||
253 | KConfigGroup cg(KSharedConfig::openConfig(), "Icons"); | | |||
254 | changeTheme = changeTheme || 0 != cg.readEntry("Theme", QString()).compare(themeName, Qt::CaseInsensitive); | | |||
255 | // tell KIconLoader an co. about the theme | | |||
256 | if (changeTheme) { | | |||
257 | cg.writeEntry("Theme", themeName); | | |||
258 | cg.sync(); | | |||
259 | } | | |||
260 | return true; | | |||
261 | } | | |||
262 | 123 | | |||
263 | /*! @brief Sets up a private icon resource file | 124 | /*! @brief Sets up a private icon resource file | ||
264 | * @return @c false on failure and sets error message. | 125 | * @return @c false on failure and sets error message. | ||
265 | * @param privateName Name to be used instead of application name for resource lookup | 126 | * @param privateName Name to be used instead of application name for resource lookup | ||
266 | * @param path Relative path to the resource file | 127 | * @param path Relative path to the resource file | ||
267 | * @param themeName Icon theme to use. It affects filename. | 128 | * @param themeName Icon theme to use. It affects filename. | ||
268 | * @param errorMessage On failure it is set to a brief error message. | 129 | * @param errorMessage On failure it is set to a brief error message. | ||
269 | * @param errorDescription On failure it is set to a detailed error message. | 130 | * @param errorDescription On failure it is set to a detailed error message. | ||
270 | * other for warning | 131 | * other for warning | ||
271 | * @param prefix Resource path prefix. The default is useful for library-global resource, | 132 | * @param prefix Resource path prefix. The default is useful for library-global resource, | ||
272 | * other values is useful for plugins. | 133 | * other values is useful for plugins. | ||
273 | */ | 134 | */ | ||
274 | bool setupPrivateIconsResourceWithMessage(const QString &privateName, const QString& path, | 135 | bool setupPrivateIconsResourceWithMessage(const QString &privateName, const QString& path, | ||
275 | const QString &themeName, | 136 | const QString &themeName, | ||
276 | QString *errorMessage, QString *detailedErrorMessage, | 137 | QString *errorMessage, QString *detailedErrorMessage, | ||
277 | const QString &prefix = QLatin1String(":/icons")) | 138 | const QString &prefix = QLatin1String(":/icons")); | ||
278 | { | | |||
279 | if (!setupPrivateIconsResource(privateName, path, themeName, | | |||
280 | errorMessage, detailedErrorMessage, prefix)) | | |||
281 | { | | |||
282 | if (detailedErrorMessage->isEmpty()) { | | |||
283 | KMessageBox::error(nullptr, *errorMessage); | | |||
284 | } else { | | |||
285 | KMessageBox::detailedError(nullptr, *errorMessage, *detailedErrorMessage); | | |||
286 | } | | |||
287 | return false; | | |||
288 | } | | |||
289 | return true; | | |||
290 | } | | |||
291 | 139 | | |||
292 | /*! @overload setupPrivateIconsResourceWithMessage(QString &privateName, const QString& path, | 140 | /*! @overload setupPrivateIconsResourceWithMessage(QString &privateName, const QString& path, | ||
293 | const QString &themeName, | 141 | const QString &themeName, | ||
294 | QString *errorMessage, QString *detailedErrorMessage, | 142 | QString *errorMessage, QString *detailedErrorMessage, | ||
295 | const QString &prefix = QLatin1String(":/icons")) | 143 | const QString &prefix = QLatin1String(":/icons")) | ||
296 | Uses default theme name. | 144 | Uses default theme name. | ||
297 | */ | 145 | */ | ||
298 | bool setupPrivateIconsResourceWithMessage(const QString &privateName, const QString& path, | 146 | bool setupPrivateIconsResourceWithMessage(const QString &privateName, const QString& path, | ||
299 | QString *errorMessage, QString *detailedErrorMessage, | 147 | QString *errorMessage, QString *detailedErrorMessage, | ||
300 | const QString &prefix = QLatin1String(":/icons")) | 148 | const QString &prefix = QLatin1String(":/icons")); | ||
301 | { | | |||
302 | return setupPrivateIconsResourceWithMessage(privateName, path, supportedIconTheme, | | |||
303 | errorMessage, detailedErrorMessage, prefix); | | |||
304 | } | | |||
305 | 149 | | |||
306 | /*! @brief Sets up a private icon resource file | 150 | /*! @brief Sets up a private icon resource file | ||
307 | * Warns on failure and returns @c false. | 151 | * Warns on failure and returns @c false. | ||
308 | * @param privateName Name to be used instead of application name for resource lookup | 152 | * @param privateName Name to be used instead of application name for resource lookup | ||
309 | * @param path Relative path to the resource file | 153 | * @param path Relative path to the resource file | ||
310 | * @param messageType Type of message to use on error, QtFatalMsg for fatal exit and any | 154 | * @param messageType Type of message to use on error, QtFatalMsg for fatal exit and any | ||
311 | * other for warning | 155 | * other for warning | ||
312 | * @param prefix Resource path prefix. The default is useful for library-global resource, | 156 | * @param prefix Resource path prefix. The default is useful for library-global resource, | ||
313 | * other values is useful for plugins. | 157 | * other values is useful for plugins. | ||
314 | */ | 158 | */ | ||
315 | bool setupPrivateIconsResourceWithMessage(const QString &privateName, const QString& path, | 159 | bool setupPrivateIconsResourceWithMessage(const QString &privateName, const QString& path, | ||
316 | QtMsgType messageType, | 160 | QtMsgType messageType, | ||
317 | const QString &prefix = QLatin1String(":/icons")) | 161 | const QString &prefix = QLatin1String(":/icons")); | ||
318 | { | | |||
319 | QString errorMessage; | | |||
320 | QString detailedErrorMessage; | | |||
321 | if (!setupPrivateIconsResourceWithMessage(privateName, path, | | |||
322 | &errorMessage, &detailedErrorMessage, prefix)) { | | |||
323 | if (messageType == QtFatalMsg) { | | |||
324 | qFatal("%s %s", qPrintable(errorMessage), qPrintable(detailedErrorMessage)); | | |||
325 | } else { | | |||
326 | qWarning() << qPrintable(errorMessage) << qPrintable(detailedErrorMessage); | | |||
327 | } | | |||
328 | return false; | | |||
329 | } | | |||
330 | return true; | | |||
331 | } | | |||
332 | 162 | | |||
333 | //! Sets up a global icon theme if it is different from supported. | 163 | //! Sets up a global icon theme if it is different from supported. | ||
334 | //! Warns on failure and returns @c false. | 164 | //! Warns on failure and returns @c false. | ||
335 | bool setupGlobalIconTheme() | 165 | bool setupGlobalIconTheme(); | ||
336 | { | 166 | | ||
337 | if (0 != QIcon::themeName().compare(supportedIconTheme, Qt::CaseInsensitive)) { | 167 | int dpiX(); | ||
338 | const QString message = QString::fromLatin1( | 168 | | ||
339 | "\"%1\" supports only \"%2\" icon theme but current system theme is \"%3\". " | 169 | int dpiY(); | ||
340 | "Application's icon theme will be changed to \"%2\". " | | |||
341 | "Please consider adding support for other themes to %4.") | | |||
342 | .arg(QLatin1String(KREPORT_BASE_NAME)).arg(supportedIconTheme).arg(QIcon::themeName()) | | |||
343 | .arg(QCoreApplication::applicationName()); | | |||
344 | qDebug() << qPrintable(message); | | |||
345 | if (!registerGlobalIconsResource()) { | | |||
346 | // don't fail, just warn | | |||
347 | const QString message = QString::fromLatin1( | | |||
348 | "Failed to set icon theme to \"%1\". Icons in the application will be inconsistent. " | | |||
349 | "Please install .rcc file(s) for the system theme.") | | |||
350 | .arg(supportedIconTheme); | | |||
351 | qDebug() << qPrintable(message); | | |||
352 | return false; | | |||
353 | } | | |||
354 | } | | |||
355 | return true; | | |||
356 | } | | |||
357 | 170 | | |||
358 | } // KReportPrivate | 171 | } // KReportPrivate | ||
359 | 172 | | |||
360 | #endif | 173 | #endif |
This include is needed in KReportUtils_p.cpp not here?