Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lintest/fb2edit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/fb2main.cpp')
-rw-r--r--source/fb2main.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/fb2main.cpp b/source/fb2main.cpp
index a55aad1..bcb4958 100644
--- a/source/fb2main.cpp
+++ b/source/fb2main.cpp
@@ -27,13 +27,14 @@ FbMainWindow::FbMainWindow(const QString &filename, ViewMode mode)
, isSwitched(false)
, isUntitled(true)
{
- connect(qApp, SIGNAL(logMessage(QString)), SLOT(logMessage(QString)));
+ connect(qApp, SIGNAL(logMessage(QtMsgType, QString)), SLOT(logMessage(QtMsgType, QString)));
setUnifiedTitleAndToolBarOnMac(true);
setAttribute(Qt::WA_DeleteOnClose);
setWindowIcon(QIcon(":icon.ico"));
mainDock = new FbMainDock(this);
+ connect(mainDock, SIGNAL(modificationChanged(bool)), SLOT(textChanged(bool)));
setCentralWidget(mainDock);
createActions();
@@ -143,12 +144,7 @@ void FbMainWindow::about()
QMessageBox::about(this, tr("About fb2edit"), text);
}
-void FbMainWindow::documentWasModified()
-{
-// setModified(isSwitched || codeEdit->isModified());
-}
-
-void FbMainWindow::setModified(bool modified)
+void FbMainWindow::textChanged(bool modified)
{
QFileInfo info = windowFilePath();
QString title = info.fileName();
@@ -575,7 +571,7 @@ void FbMainWindow::setCurrentFile(const QString &filename)
curFile = info.canonicalFilePath();
}
setWindowFilePath(curFile);
- setModified(false);
+ textChanged(false);
}
QString FbMainWindow::appTitle() const