GUI: Show project file's name in project file -dialog title.

This commit is contained in:
Kimmo Varis 2010-07-12 20:31:37 +03:00
parent e468779feb
commit 4ceea93945
8 changed files with 195 additions and 161 deletions

View File

@ -427,6 +427,7 @@ Stop the checking before exiting.</source>
</message>
<message>
<location filename="mainwindow.cpp" line="688"/>
<location filename="mainwindow.cpp" line="704"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
@ -435,6 +436,11 @@ Stop the checking before exiting.</source>
<source>Select Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="706"/>
<source>Select Project Filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="translationhandler.cpp" line="34"/>
<source>Finnish</source>
@ -471,6 +477,25 @@ Stop the checking before exiting.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Project</name>
<message>
<location filename="project.cpp" line="63"/>
<location filename="project.cpp" line="96"/>
<source>Cppcheck</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="project.cpp" line="64"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="project.cpp" line="97"/>
<source>Could not write the project file.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectFile</name>
<message>
@ -492,29 +517,8 @@ Stop the checking before exiting.</source>
<context>
<name>ProjectFileDialog</name>
<message>
<location filename="projectfiledialog.cpp" line="48"/>
<location filename="projectfiledialog.cpp" line="106"/>
<source>Cppcheck</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="49"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="87"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="89"/>
<source>Save Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="107"/>
<source>Could not write the project file.</source>
<location filename="projectfiledialog.cpp" line="30"/>
<source>Project file: %1</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -444,6 +444,7 @@ Stop the checking before exiting.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="688"/>
<location filename="mainwindow.cpp" line="704"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
@ -452,6 +453,11 @@ Stop the checking before exiting.</translation>
<source>Select Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="706"/>
<source>Select Project Filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="translationhandler.cpp" line="34"/>
<source>Finnish</source>
@ -488,6 +494,25 @@ Stop the checking before exiting.</translation>
<translation>Polish</translation>
</message>
</context>
<context>
<name>Project</name>
<message>
<location filename="project.cpp" line="63"/>
<location filename="project.cpp" line="96"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="project.cpp" line="64"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="project.cpp" line="97"/>
<source>Could not write the project file.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectFile</name>
<message>
@ -509,29 +534,8 @@ Stop the checking before exiting.</translation>
<context>
<name>ProjectFileDialog</name>
<message>
<location filename="projectfiledialog.cpp" line="48"/>
<location filename="projectfiledialog.cpp" line="106"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="49"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="87"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="89"/>
<source>Save Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="107"/>
<source>Could not write the project file.</source>
<location filename="projectfiledialog.cpp" line="30"/>
<source>Project file: %1</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -448,6 +448,7 @@ Lopeta tarkistus ennen ohjelman sammuttamista.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="688"/>
<location filename="mainwindow.cpp" line="704"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
@ -456,6 +457,11 @@ Lopeta tarkistus ennen ohjelman sammuttamista.</translation>
<source>Select Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="706"/>
<source>Select Project Filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="translationhandler.cpp" line="34"/>
<source>Finnish</source>
@ -492,6 +498,25 @@ Lopeta tarkistus ennen ohjelman sammuttamista.</translation>
<translation>Puola</translation>
</message>
</context>
<context>
<name>Project</name>
<message>
<location filename="project.cpp" line="63"/>
<location filename="project.cpp" line="96"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="project.cpp" line="64"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="project.cpp" line="97"/>
<source>Could not write the project file.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectFile</name>
<message>
@ -513,29 +538,8 @@ Lopeta tarkistus ennen ohjelman sammuttamista.</translation>
<context>
<name>ProjectFileDialog</name>
<message>
<location filename="projectfiledialog.cpp" line="48"/>
<location filename="projectfiledialog.cpp" line="106"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="49"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="87"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="89"/>
<source>Save Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="107"/>
<source>Could not write the project file.</source>
<location filename="projectfiledialog.cpp" line="30"/>
<source>Project file: %1</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -444,6 +444,7 @@ Stop de controle alvorens te sluiten.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="688"/>
<location filename="mainwindow.cpp" line="704"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
@ -452,6 +453,11 @@ Stop de controle alvorens te sluiten.</translation>
<source>Select Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="706"/>
<source>Select Project Filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="translationhandler.cpp" line="34"/>
<source>Finnish</source>
@ -488,6 +494,25 @@ Stop de controle alvorens te sluiten.</translation>
<translation>Pools</translation>
</message>
</context>
<context>
<name>Project</name>
<message>
<location filename="project.cpp" line="63"/>
<location filename="project.cpp" line="96"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="project.cpp" line="64"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="project.cpp" line="97"/>
<source>Could not write the project file.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectFile</name>
<message>
@ -509,29 +534,8 @@ Stop de controle alvorens te sluiten.</translation>
<context>
<name>ProjectFileDialog</name>
<message>
<location filename="projectfiledialog.cpp" line="48"/>
<location filename="projectfiledialog.cpp" line="106"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="49"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="87"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="89"/>
<source>Save Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="107"/>
<source>Could not write the project file.</source>
<location filename="projectfiledialog.cpp" line="30"/>
<source>Project file: %1</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -392,6 +392,11 @@ Stop the checking before exiting.</source>
<source>Save the report file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="706"/>
<source>Select Project Filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="442"/>
<location filename="mainwindow.cpp" line="552"/>
@ -424,6 +429,7 @@ Stop the checking before exiting.</source>
</message>
<message>
<location filename="mainwindow.cpp" line="688"/>
<location filename="mainwindow.cpp" line="704"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
@ -468,6 +474,25 @@ Stop the checking before exiting.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Project</name>
<message>
<location filename="project.cpp" line="63"/>
<location filename="project.cpp" line="96"/>
<source>Cppcheck</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="project.cpp" line="64"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="project.cpp" line="97"/>
<source>Could not write the project file.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectFile</name>
<message>
@ -489,29 +514,8 @@ Stop the checking before exiting.</source>
<context>
<name>ProjectFileDialog</name>
<message>
<location filename="projectfiledialog.cpp" line="48"/>
<location filename="projectfiledialog.cpp" line="106"/>
<source>Cppcheck</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="49"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="87"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="89"/>
<source>Save Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="107"/>
<source>Could not write the project file.</source>
<location filename="projectfiledialog.cpp" line="30"/>
<source>Project file: %1</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -434,6 +434,7 @@ Stop the checking before exiting.</source>
</message>
<message>
<location filename="mainwindow.cpp" line="688"/>
<location filename="mainwindow.cpp" line="704"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
@ -442,6 +443,11 @@ Stop the checking before exiting.</source>
<source>Select Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="706"/>
<source>Select Project Filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="translationhandler.cpp" line="34"/>
<source>Finnish</source>
@ -478,6 +484,25 @@ Stop the checking before exiting.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Project</name>
<message>
<location filename="project.cpp" line="63"/>
<location filename="project.cpp" line="96"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="project.cpp" line="64"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="project.cpp" line="97"/>
<source>Could not write the project file.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectFile</name>
<message>
@ -499,29 +524,8 @@ Stop the checking before exiting.</source>
<context>
<name>ProjectFileDialog</name>
<message>
<location filename="projectfiledialog.cpp" line="48"/>
<location filename="projectfiledialog.cpp" line="106"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="49"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="87"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="89"/>
<source>Save Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="107"/>
<source>Could not write the project file.</source>
<location filename="projectfiledialog.cpp" line="30"/>
<source>Project file: %1</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -445,6 +445,7 @@ Stop the checking before exiting.</source>
</message>
<message>
<location filename="mainwindow.cpp" line="688"/>
<location filename="mainwindow.cpp" line="704"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
@ -453,6 +454,11 @@ Stop the checking before exiting.</source>
<source>Select Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="706"/>
<source>Select Project Filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="translationhandler.cpp" line="34"/>
<source>Finnish</source>
@ -489,6 +495,25 @@ Stop the checking before exiting.</source>
<translation>Polska</translation>
</message>
</context>
<context>
<name>Project</name>
<message>
<location filename="project.cpp" line="63"/>
<location filename="project.cpp" line="96"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="project.cpp" line="64"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="project.cpp" line="97"/>
<source>Could not write the project file.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectFile</name>
<message>
@ -510,29 +535,8 @@ Stop the checking before exiting.</source>
<context>
<name>ProjectFileDialog</name>
<message>
<location filename="projectfiledialog.cpp" line="48"/>
<location filename="projectfiledialog.cpp" line="106"/>
<source>Cppcheck</source>
<translation type="unfinished">Cppcheck</translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="49"/>
<source>Could not read the project file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="87"/>
<source>Project files (*.cppcheck);;All files(*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="89"/>
<source>Save Project File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="projectfiledialog.cpp" line="107"/>
<source>Could not write the project file.</source>
<location filename="projectfiledialog.cpp" line="30"/>
<source>Project file: %1</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -17,6 +17,7 @@
*/
#include <QStringList>
#include <QFileInfo>
#include "projectfiledialog.h"
ProjectFileDialog::ProjectFileDialog(const QString &path, QWidget *parent)
@ -24,6 +25,11 @@ ProjectFileDialog::ProjectFileDialog(const QString &path, QWidget *parent)
{
mUI.setupUi(this);
QFileInfo inf(path);
QString filename = inf.fileName();
QString title = tr("Project file: %1").arg(filename);
setWindowTitle(title);
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(accept()));
}