GUI: Move application definition to own header file.
This commit is contained in:
parent
88176051fe
commit
3cb3992043
|
@ -0,0 +1,30 @@
|
|||
#ifndef APPLICATION_H
|
||||
#define APPLICATION_H
|
||||
|
||||
/**
|
||||
* @brief A class containing information of the application to execute.
|
||||
*
|
||||
*/
|
||||
class Application
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Application's name
|
||||
*
|
||||
*/
|
||||
QString Name;
|
||||
|
||||
/**
|
||||
* @brief Application's path
|
||||
*
|
||||
*/
|
||||
QString Path;
|
||||
|
||||
/**
|
||||
* @brief Application's parameters
|
||||
*
|
||||
*/
|
||||
QString Parameters;
|
||||
};
|
||||
|
||||
#endif // APPLICATION_H
|
|
@ -175,11 +175,11 @@ void ApplicationList::AddApplication(const QString &name,
|
|||
return;
|
||||
}
|
||||
|
||||
ApplicationType type;
|
||||
type.Name = name;
|
||||
type.Path = path;
|
||||
type.Parameters = parameters;
|
||||
mApplications << type;
|
||||
Application app;
|
||||
app.Name = name;
|
||||
app.Path = path;
|
||||
app.Parameters = parameters;
|
||||
mApplications << app;
|
||||
}
|
||||
|
||||
void ApplicationList::RemoveApplication(const int index)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
#include "application.h"
|
||||
|
||||
/// @addtogroup GUI
|
||||
/// @{
|
||||
|
@ -49,31 +50,6 @@ class ApplicationList : public QObject
|
|||
Q_OBJECT
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief Struct containing information of the application
|
||||
*
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/**
|
||||
* @brief Application's name
|
||||
*
|
||||
*/
|
||||
QString Name;
|
||||
|
||||
/**
|
||||
* @brief Application's path
|
||||
*
|
||||
*/
|
||||
QString Path;
|
||||
|
||||
/**
|
||||
* @brief Application's parameters
|
||||
*
|
||||
*/
|
||||
QString Parameters;
|
||||
} ApplicationType;
|
||||
|
||||
ApplicationList(QObject *parent = 0);
|
||||
virtual ~ApplicationList();
|
||||
|
||||
|
@ -193,7 +169,7 @@ private:
|
|||
* @brief List of applications
|
||||
*
|
||||
*/
|
||||
QList<ApplicationType> mApplications;
|
||||
QList<Application> mApplications;
|
||||
|
||||
/**
|
||||
* @brief Index of the default application.
|
||||
|
|
229
gui/gui.pro
229
gui/gui.pro
|
@ -1,114 +1,115 @@
|
|||
TEMPLATE = app
|
||||
TARGET = cppcheck-gui
|
||||
QT += xml
|
||||
CONFIG += warn_on help
|
||||
DEPENDPATH += . \
|
||||
../lib
|
||||
INCLUDEPATH += . \
|
||||
../lib
|
||||
LIBS+=-L../externals
|
||||
|
||||
DESTDIR = .
|
||||
RCC_DIR = temp
|
||||
MOC_DIR = temp
|
||||
OBJECTS_DIR = temp
|
||||
UI_DIR = temp
|
||||
|
||||
win32 {
|
||||
DESTDIR = ../Build/gui
|
||||
RCC_DIR = ../BuildTmp/gui
|
||||
MOC_DIR = ../BuildTmp/gui
|
||||
OBJECTS_DIR = ../BuildTmp/gui
|
||||
UI_DIR = ../BuildTmp/gui
|
||||
}
|
||||
|
||||
RESOURCES = gui.qrc
|
||||
FORMS = main.ui \
|
||||
resultsview.ui \
|
||||
application.ui \
|
||||
settings.ui \
|
||||
file.ui \
|
||||
projectfile.ui \
|
||||
about.ui \
|
||||
logview.ui \
|
||||
stats.ui
|
||||
|
||||
TRANSLATIONS = cppcheck_fi.ts \
|
||||
cppcheck_fr.ts \
|
||||
cppcheck_nl.ts \
|
||||
cppcheck_en.ts \
|
||||
cppcheck_sv.ts \
|
||||
cppcheck_de.ts \
|
||||
cppcheck_pl.ts \
|
||||
cppcheck_ru.ts \
|
||||
cppcheck_ja.ts \
|
||||
cppcheck_sr.ts
|
||||
|
||||
# Windows-specific options
|
||||
CONFIG += embed_manifest_exe
|
||||
|
||||
BASEPATH = ../lib/
|
||||
include($$PWD/../lib/lib.pri)
|
||||
|
||||
HEADERS += mainwindow.h \
|
||||
checkthread.h \
|
||||
resultsview.h \
|
||||
resultstree.h \
|
||||
settingsdialog.h \
|
||||
threadresult.h \
|
||||
threadhandler.h \
|
||||
applicationlist.h \
|
||||
applicationdialog.h \
|
||||
aboutdialog.h \
|
||||
common.h \
|
||||
erroritem.h \
|
||||
fileviewdialog.h \
|
||||
project.h \
|
||||
projectfile.h \
|
||||
projectfiledialog.h \
|
||||
report.h \
|
||||
txtreport.h \
|
||||
xmlreport.h \
|
||||
xmlreportv1.h \
|
||||
xmlreportv2.h \
|
||||
translationhandler.h \
|
||||
csvreport.h \
|
||||
logview.h \
|
||||
filelist.h \
|
||||
statsdialog.h \
|
||||
checkstatistics.h
|
||||
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp\
|
||||
checkthread.cpp \
|
||||
resultsview.cpp \
|
||||
resultstree.cpp \
|
||||
threadresult.cpp \
|
||||
threadhandler.cpp \
|
||||
settingsdialog.cpp \
|
||||
applicationlist.cpp \
|
||||
applicationdialog.cpp \
|
||||
aboutdialog.cpp \
|
||||
fileviewdialog.cpp \
|
||||
project.cpp \
|
||||
projectfile.cpp \
|
||||
projectfiledialog.cpp \
|
||||
erroritem.cpp \
|
||||
report.cpp \
|
||||
txtreport.cpp \
|
||||
xmlreport.cpp \
|
||||
xmlreportv1.cpp \
|
||||
xmlreportv2.cpp \
|
||||
translationhandler.cpp \
|
||||
csvreport.cpp \
|
||||
logview.cpp \
|
||||
filelist.cpp \
|
||||
statsdialog.cpp \
|
||||
checkstatistics.cpp
|
||||
|
||||
win32 {
|
||||
DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||
RC_FILE = cppcheck-gui.rc
|
||||
HEADERS += ../cli/resource.h
|
||||
LIBS += -lshlwapi
|
||||
}
|
||||
TEMPLATE = app
|
||||
TARGET = cppcheck-gui
|
||||
QT += xml
|
||||
CONFIG += warn_on help
|
||||
DEPENDPATH += . \
|
||||
../lib
|
||||
INCLUDEPATH += . \
|
||||
../lib
|
||||
LIBS+=-L../externals
|
||||
|
||||
DESTDIR = .
|
||||
RCC_DIR = temp
|
||||
MOC_DIR = temp
|
||||
OBJECTS_DIR = temp
|
||||
UI_DIR = temp
|
||||
|
||||
win32 {
|
||||
DESTDIR = ../Build/gui
|
||||
RCC_DIR = ../BuildTmp/gui
|
||||
MOC_DIR = ../BuildTmp/gui
|
||||
OBJECTS_DIR = ../BuildTmp/gui
|
||||
UI_DIR = ../BuildTmp/gui
|
||||
}
|
||||
|
||||
RESOURCES = gui.qrc
|
||||
FORMS = main.ui \
|
||||
resultsview.ui \
|
||||
application.ui \
|
||||
settings.ui \
|
||||
file.ui \
|
||||
projectfile.ui \
|
||||
about.ui \
|
||||
logview.ui \
|
||||
stats.ui
|
||||
|
||||
TRANSLATIONS = cppcheck_fi.ts \
|
||||
cppcheck_fr.ts \
|
||||
cppcheck_nl.ts \
|
||||
cppcheck_en.ts \
|
||||
cppcheck_sv.ts \
|
||||
cppcheck_de.ts \
|
||||
cppcheck_pl.ts \
|
||||
cppcheck_ru.ts \
|
||||
cppcheck_ja.ts \
|
||||
cppcheck_sr.ts
|
||||
|
||||
# Windows-specific options
|
||||
CONFIG += embed_manifest_exe
|
||||
|
||||
BASEPATH = ../lib/
|
||||
include($$PWD/../lib/lib.pri)
|
||||
|
||||
HEADERS += mainwindow.h \
|
||||
checkthread.h \
|
||||
resultsview.h \
|
||||
resultstree.h \
|
||||
settingsdialog.h \
|
||||
threadresult.h \
|
||||
threadhandler.h \
|
||||
applicationlist.h \
|
||||
applicationdialog.h \
|
||||
aboutdialog.h \
|
||||
common.h \
|
||||
erroritem.h \
|
||||
fileviewdialog.h \
|
||||
project.h \
|
||||
projectfile.h \
|
||||
projectfiledialog.h \
|
||||
report.h \
|
||||
txtreport.h \
|
||||
xmlreport.h \
|
||||
xmlreportv1.h \
|
||||
xmlreportv2.h \
|
||||
translationhandler.h \
|
||||
csvreport.h \
|
||||
logview.h \
|
||||
filelist.h \
|
||||
statsdialog.h \
|
||||
checkstatistics.h \
|
||||
application.h
|
||||
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp\
|
||||
checkthread.cpp \
|
||||
resultsview.cpp \
|
||||
resultstree.cpp \
|
||||
threadresult.cpp \
|
||||
threadhandler.cpp \
|
||||
settingsdialog.cpp \
|
||||
applicationlist.cpp \
|
||||
applicationdialog.cpp \
|
||||
aboutdialog.cpp \
|
||||
fileviewdialog.cpp \
|
||||
project.cpp \
|
||||
projectfile.cpp \
|
||||
projectfiledialog.cpp \
|
||||
erroritem.cpp \
|
||||
report.cpp \
|
||||
txtreport.cpp \
|
||||
xmlreport.cpp \
|
||||
xmlreportv1.cpp \
|
||||
xmlreportv2.cpp \
|
||||
translationhandler.cpp \
|
||||
csvreport.cpp \
|
||||
logview.cpp \
|
||||
filelist.cpp \
|
||||
statsdialog.cpp \
|
||||
checkstatistics.cpp
|
||||
|
||||
win32 {
|
||||
DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||
RC_FILE = cppcheck-gui.rc
|
||||
HEADERS += ../cli/resource.h
|
||||
LIBS += -lshlwapi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue