summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbxsettings.cpp
diff options
context:
space:
mode:
authorJorgen Lind <jorgen.lind@digia.com>2014-01-23 16:30:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-23 19:18:35 +0100
commiteeff8f7e7431eea6b6af4133413db2c610dfc123 (patch)
treef4e152babeb6782d1db008f1b5d62259f4f0b716 /src/plugins/platforms/xcb/qxcbxsettings.cpp
parent614589d844921e351e5422ba4a9b55aac22566c5 (diff)
Silence failed xcbxsettings initialization
also add a boolean flag indicating if xsettings is initialized and can be used Change-Id: I9dae83b8fef224171744d2b940767cbf54ce4f55 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbxsettings.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbxsettings.cpp b/src/plugins/platforms/xcb/qxcbxsettings.cpp
index 8679d502d9..141a6cc0cb 100644
--- a/src/plugins/platforms/xcb/qxcbxsettings.cpp
+++ b/src/plugins/platforms/xcb/qxcbxsettings.cpp
@@ -99,6 +99,7 @@ class QXcbXSettingsPrivate
public:
QXcbXSettingsPrivate(QXcbScreen *screen)
: screen(screen)
+ , initialized(false)
{
}
@@ -202,6 +203,7 @@ public:
QXcbScreen *screen;
xcb_window_t x_settings_window;
QMap<QByteArray, QXcbXSettingsPropertyValue> settings;
+ bool initialized;
};
@@ -217,7 +219,6 @@ QXcbXSettings::QXcbXSettings(QXcbScreen *screen)
xcb_generic_error_t *error = 0;
xcb_intern_atom_reply_t *atom_reply = xcb_intern_atom_reply(screen->xcb_connection(),atom_cookie,&error);
if (error) {
- qWarning() << Q_FUNC_INFO << "Failed to find XSETTINGS_S atom";
free(error);
return;
}
@@ -230,7 +231,6 @@ QXcbXSettings::QXcbXSettings(QXcbScreen *screen)
xcb_get_selection_owner_reply_t *selection_result =
xcb_get_selection_owner_reply(screen->xcb_connection(), selection_cookie, &error);
if (error) {
- qWarning() << Q_FUNC_INFO << "Failed to get selection owner for XSETTINGS_S atom";
free(error);
return;
}
@@ -246,6 +246,13 @@ QXcbXSettings::QXcbXSettings(QXcbScreen *screen)
xcb_change_window_attributes(screen->xcb_connection(),d_ptr->x_settings_window,event,event_mask);
d_ptr->populateSettings(d_ptr->getSettings());
+ d_ptr->initialized = true;
+}
+
+bool QXcbXSettings::initialized() const
+{
+ Q_D(const QXcbXSettings);
+ return d->initialized;
}
void QXcbXSettings::handlePropertyNotifyEvent(const xcb_property_notify_event_t *event)