summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-04-04 22:40:21 +0200
committerThomas Haller <thaller@redhat.com>2014-04-04 23:20:05 +0200
commit2748bcfebff927bc2bae988d42e143e3fd68445c (patch)
treea87e3e75da18d39944fb9c611989384c22d0a6e3
parentdac51747ab5853b00557d7d97d4b2eae05968c03 (diff)
downloadNetworkManager-2748bcfebff927bc2bae988d42e143e3fd68445c.tar.gz
examples: fix qt demo to work without STL support
The function toStdString() is only available when QT was compiled with STL support. The configure script does not check STL support and might build the QT examples even if toStdString() is not available. Fix this, by not using the function. This fixes the previous commit f73e3669b3bb9b3547173896dcea8e2eb17d30ec that I pushed accidentally. https://bugzilla.gnome.org/show_bug.cgi?id=727608 Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--examples/C/qt/monitor-nm-running.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/C/qt/monitor-nm-running.cpp b/examples/C/qt/monitor-nm-running.cpp
index e955dd4216..cf597b5410 100644
--- a/examples/C/qt/monitor-nm-running.cpp
+++ b/examples/C/qt/monitor-nm-running.cpp
@@ -51,13 +51,13 @@ class NMWatcher: public QObject {
void NMWatcher::serviceRegistered(const QString& name)
{
- std::cout << "Name '" << name.constData() << "' registered"
+ std::cout << "Name '" << name.toUtf8().constData() << "' registered"
<< " => NM is running" << std::endl;
}
void NMWatcher::serviceUnregistered(const QString& name)
{
- std::cout << "Name '" << name.constData() << "' unregistered"
+ std::cout << "Name '" << name.toUtf8().constData() << "' unregistered"
<< " => NM is not running" << std::endl;
}