summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/xmlpatterns/filetree/mainwindow.cpp4
-rw-r--r--examples/xmlpatterns/filetree/mainwindow.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/xmlpatterns/filetree/mainwindow.cpp b/examples/xmlpatterns/filetree/mainwindow.cpp
index cec7006..9bf71cd 100644
--- a/examples/xmlpatterns/filetree/mainwindow.cpp
+++ b/examples/xmlpatterns/filetree/mainwindow.cpp
@@ -81,9 +81,9 @@ MainWindow::MainWindow() : m_fileTree(m_namePool)
//! [0]
//! [2]
-void MainWindow::on_queryBox_currentIndexChanged()
+void MainWindow::on_queryBox_currentIndexChanged(const QString &currentText)
{
- QFile queryFile(":/queries/" + queryBox->currentText());
+ QFile queryFile(":/queries/" + currentText);
queryFile.open(QIODevice::ReadOnly);
queryEdit->setPlainText(QString::fromLatin1(queryFile.readAll()));
diff --git a/examples/xmlpatterns/filetree/mainwindow.h b/examples/xmlpatterns/filetree/mainwindow.h
index 5b39be5..aaaec9a 100644
--- a/examples/xmlpatterns/filetree/mainwindow.h
+++ b/examples/xmlpatterns/filetree/mainwindow.h
@@ -58,7 +58,7 @@ public:
private slots:
void on_actionOpenDirectory_triggered();
void on_actionAbout_triggered();
- void on_queryBox_currentIndexChanged();
+ void on_queryBox_currentIndexChanged(const QString &);
private:
void loadDirectory(const QString &directory);