summaryrefslogtreecommitdiffstats
path: root/examples/xmlpatterns
diff options
context:
space:
mode:
authorTobias Koenig <tokoe@kde.org>2009-06-16 16:07:42 (GMT)
committerTobias Koenig <tokoe@kde.org>2009-06-16 16:07:42 (GMT)
commit65c2d095cddfda32052925654dd1defd314ad4b3 (patch)
tree222ac5b04cd1c7a273b0c22d01d0ff3682d5d2d3 /examples/xmlpatterns
parentf1e6e89f7ee452af0e4404af537f5fed2a2b2dc5 (diff)
parentd9308550f104526d29b1cdd56514ae3bb967d7f9 (diff)
downloadQt-65c2d095cddfda32052925654dd1defd314ad4b3.zip
Qt-65c2d095cddfda32052925654dd1defd314ad4b3.tar.gz
Qt-65c2d095cddfda32052925654dd1defd314ad4b3.tar.bz2
Merge branch 'master' of git://gitorious.org/qt/qt
Diffstat (limited to 'examples/xmlpatterns')
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.cpp9
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.cpp2
2 files changed, 5 insertions, 6 deletions
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
index aeb7224..a6628df 100644
--- a/examples/xmlpatterns/trafficinfo/mainwindow.cpp
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
@@ -69,16 +69,15 @@ MainWindow::MainWindow()
setWindowTitle(tr("Traffic Info Oslo"));
- QTimer *timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), this, SLOT(updateTimeInformation()));
- timer->start(1000*60*5);
-
const QSettings settings("Qt Software", "trafficinfo");
m_station = StationInformation(settings.value("stationId", "03012130").toString(),
settings.value("stationName", "Nydalen [T-bane] (OSL)").toString());
m_lines = settings.value("lines", QStringList()).toStringList();
- updateTimeInformation();
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(updateTimeInformation()));
+ timer->start(1000*60*5);
+ QMetaObject::invokeMethod(this, SLOT(updateTimeInformation()), Qt::QueuedConnection);
}
MainWindow::~MainWindow()
diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.cpp b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
index 54ed904..6c3846b 100644
--- a/examples/xmlpatterns/trafficinfo/stationdialog.cpp
+++ b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
@@ -125,7 +125,7 @@ StationDialog::StationDialog(const QString &name, const QStringList &lineNumbers
m_ui.m_line4->setText(lineNumbers.at(i));
}
- searchStations();
+ QMetaObject::invokeMethod(this, SLOT(searchStations()), Qt::QueuedConnection);
}
StationInformation StationDialog::selectedStation() const