summaryrefslogtreecommitdiffstats
path: root/examples/mainwindows/sdi/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mainwindows/sdi/mainwindow.cpp')
-rw-r--r--examples/mainwindows/sdi/mainwindow.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/mainwindows/sdi/mainwindow.cpp b/examples/mainwindows/sdi/mainwindow.cpp
index 8710105..1e7f2c0 100644
--- a/examples/mainwindows/sdi/mainwindow.cpp
+++ b/examples/mainwindows/sdi/mainwindow.cpp
@@ -266,7 +266,7 @@ void MainWindow::createStatusBar()
void MainWindow::readSettings()
{
- QSettings settings("Trolltech", "SDI Example");
+ QSettings settings;
QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
QSize size = settings.value("size", QSize(400, 400)).toSize();
move(pos);
@@ -275,7 +275,7 @@ void MainWindow::readSettings()
void MainWindow::writeSettings()
{
- QSettings settings("Trolltech", "SDI Example");
+ QSettings settings;
settings.setValue("pos", pos());
settings.setValue("size", size());
}
@@ -352,9 +352,7 @@ void MainWindow::setCurrentFile(const QString &fileName)
textEdit->document()->setModified(false);
setWindowModified(false);
-
- setWindowTitle(tr("%1[*] - %2").arg(strippedName(curFile))
- .arg(tr("SDI")));
+ setWindowFilePath(curFile);
}
QString MainWindow::strippedName(const QString &fullFileName)