summaryrefslogtreecommitdiffstats
path: root/examples/mainwindows/application/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mainwindows/application/mainwindow.cpp')
-rw-r--r--examples/mainwindows/application/mainwindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/mainwindows/application/mainwindow.cpp b/examples/mainwindows/application/mainwindow.cpp
index 16b18b4..43dfe14 100644
--- a/examples/mainwindows/application/mainwindow.cpp
+++ b/examples/mainwindows/application/mainwindow.cpp
@@ -328,9 +328,13 @@ void MainWindow::loadFile(const QString &fileName)
}
QTextStream in(&file);
+#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
+#endif
textEdit->setPlainText(in.readAll());
+#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
+#endif
setCurrentFile(fileName);
statusBar()->showMessage(tr("File loaded"), 2000);
@@ -351,9 +355,13 @@ bool MainWindow::saveFile(const QString &fileName)
}
QTextStream out(&file);
+#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
+#endif
out << textEdit->toPlainText();
+#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
+#endif
setCurrentFile(fileName);
statusBar()->showMessage(tr("File saved"), 2000);