Use const in generateWindowTitle()
This commit is contained in:
parent
0619814654
commit
aa300b237f
|
@ -9,7 +9,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
|||
set(META_APP_DESCRIPTION "Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models")
|
||||
set(META_VERSION_MAJOR 5)
|
||||
set(META_VERSION_MINOR 10)
|
||||
set(META_VERSION_PATCH 0)
|
||||
set(META_VERSION_PATCH 1)
|
||||
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
|
||||
|
||||
# add project files
|
||||
|
|
|
@ -29,7 +29,7 @@ QString generateWindowTitle(DocumentStatus documentStatus, const QString &docume
|
|||
if (documentPath.isEmpty()) {
|
||||
return QCoreApplication::translate("Utilities::windowTitle", "Unsaved - %1").arg(QCoreApplication::applicationName());
|
||||
} else {
|
||||
QFileInfo file(documentPath);
|
||||
const QFileInfo file(documentPath);
|
||||
return QCoreApplication::translate("Utilities::windowTitle", "%1 - %2 - %3")
|
||||
.arg(file.fileName(), file.dir().path(), QCoreApplication::applicationName());
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ QString generateWindowTitle(DocumentStatus documentStatus, const QString &docume
|
|||
if (documentPath.isEmpty()) {
|
||||
return QCoreApplication::translate("Utilities::windowTitle", "*Unsaved - %1").arg(QCoreApplication::applicationName());
|
||||
} else {
|
||||
QFileInfo file(documentPath);
|
||||
const QFileInfo file(documentPath);
|
||||
return QCoreApplication::translate("Utilities::windowTitle", "*%1 - %2 - %3")
|
||||
.arg(file.fileName(), file.dir().path(), QCoreApplication::applicationName());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue