ui: remove MessageNewLog
* remove Logging checkboxes in prefernces * commandline parser project path is absolute when called from commandline
This commit is contained in:
@@ -5,10 +5,25 @@
|
||||
#include "utility/file/FilePath.h"
|
||||
#include "utility/messaging/type/MessageDispatchWhenLicenseValid.h"
|
||||
#include "utility/messaging/type/MessageLoadProject.h"
|
||||
#include "utility/logging/LogManager.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
|
||||
QtApplication::QtApplication(int& argc, char** argv)
|
||||
: QApplication(argc, argv)
|
||||
{
|
||||
connect(this, &QCoreApplication::aboutToQuit,
|
||||
[=]()
|
||||
{
|
||||
LogManager::getInstance()->setLoggingEnabled(false);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
int QtApplication::exec()
|
||||
{
|
||||
LogManager::getInstance()->setLoggingEnabled(ApplicationSettings::getInstance()->getLoggingEnabled());
|
||||
|
||||
return QCoreApplication::exec();
|
||||
}
|
||||
|
||||
// responds to FileOpenEvent specific for Mac
|
||||
|
||||
@@ -10,6 +10,7 @@ public:
|
||||
QtApplication(int& argc, char** argv);
|
||||
|
||||
bool event(QEvent *event);
|
||||
int exec();
|
||||
};
|
||||
|
||||
#endif // QT_APPLICATION_H
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "settings/ApplicationSettings.h"
|
||||
|
||||
|
||||
class SelectableCellDelegate : public QStyledItemDelegate
|
||||
{
|
||||
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
virtual ~QtTable();
|
||||
|
||||
void updateRows();
|
||||
void setTableModel(QAbstractItemModel* model);
|
||||
int getFilledRowCount();
|
||||
|
||||
void showLastRow();
|
||||
|
||||
@@ -59,6 +59,7 @@ void QtErrorView::createWidgetWrapper()
|
||||
setWidgetWrapper(std::make_shared<QtViewWidgetWrapper>(new QFrame()));
|
||||
}
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
void QtErrorView::initView()
|
||||
{
|
||||
QWidget* widget = QtViewWidgetWrapper::getWidgetOfView(this);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "utility/messaging/type/MessageRefresh.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
#include "qt/utility/utilityQt.h"
|
||||
#include "utility/logging/LogManager.h"
|
||||
#include "qt/element/QtTable.h"
|
||||
|
||||
|
||||
@@ -44,8 +45,9 @@ void QtLogView::initView()
|
||||
QHBoxLayout* headerLayout = new QHBoxLayout();
|
||||
headerLayout->addSpacing(10);
|
||||
|
||||
m_viewEnabled = new QCheckBox("Enable");
|
||||
m_viewEnabled = new QCheckBox("Logging enabled (file, console logging)");
|
||||
m_viewEnabled->setChecked(ApplicationSettings::getInstance()->getLoggingEnabled());
|
||||
|
||||
connect(m_viewEnabled, &QCheckBox::stateChanged,
|
||||
[=](int){
|
||||
setLoggingEnabled(m_viewEnabled->isChecked());
|
||||
@@ -53,7 +55,7 @@ void QtLogView::initView()
|
||||
);
|
||||
headerLayout->addWidget(m_viewEnabled);
|
||||
headerLayout->addSpacing(25);
|
||||
m_showAstLogging = new QCheckBox("Ast");
|
||||
m_showAstLogging = new QCheckBox("AST Logging");
|
||||
m_showAstLogging->setEnabled(m_viewEnabled->isChecked());
|
||||
m_showAstLogging->setChecked(ApplicationSettings::getInstance()->getVerboseIndexerLoggingEnabled());
|
||||
connect(m_showAstLogging, &QCheckBox::stateChanged,
|
||||
@@ -119,6 +121,7 @@ QCheckBox* QtLogView::createFilterCheckbox(const QString& name, QBoxLayout* layo
|
||||
void QtLogView::setLoggingEnabled(bool enabled)
|
||||
{
|
||||
m_showAstLogging->setEnabled(enabled);
|
||||
LogManager::getInstance()->setLoggingEnabled(true);
|
||||
|
||||
ApplicationSettings::getInstance()->setLoggingEnabled(enabled);
|
||||
ApplicationSettings::getInstance()->save();
|
||||
@@ -246,7 +249,7 @@ void QtLogView::addLogToTable(Log log)
|
||||
|
||||
void QtLogView::doAddLog(Logger::LogLevel type, const LogMessage& message)
|
||||
{
|
||||
if (m_viewEnabled->isChecked() && isCheckedType(type))
|
||||
if (isCheckedType(type))
|
||||
{
|
||||
Log log(
|
||||
type,
|
||||
|
||||
@@ -119,9 +119,9 @@ void QtProjectWizzard::newProjectFromSolution(const std::string& ideId, const st
|
||||
void QtProjectWizzard::newProjectFromCDB(const std::string& filePath, const std::vector<std::string>& headerPaths)
|
||||
{
|
||||
FilePath fp(filePath);
|
||||
|
||||
|
||||
std::vector<FilePath> hp;
|
||||
for (int i = 0; i < headerPaths.size(); i++)
|
||||
for (size_t i = 0; i < headerPaths.size(); i++)
|
||||
{
|
||||
hp.push_back(FilePath(headerPaths[i]));
|
||||
}
|
||||
|
||||
@@ -57,13 +57,6 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row)
|
||||
}
|
||||
connect(m_colorSchemes, SIGNAL(activated(int)), this, SLOT(colorSchemeChanged(int)));
|
||||
|
||||
// logging
|
||||
m_loggingEnabled = addCheckBox("Logging", "Enable console and file logging",
|
||||
"Save log files and show log information in the console.", layout, row);
|
||||
connect(m_loggingEnabled, SIGNAL(clicked()), this, SLOT(loggingEnabledChanged()));
|
||||
|
||||
m_verboseIndexerLoggingEnabled = addCheckBox("Indexer Logging", "Enable verbose indexer logging", "", layout, row);
|
||||
|
||||
addGap(layout, row);
|
||||
|
||||
// Controls
|
||||
@@ -171,10 +164,6 @@ void QtProjectWizzardContentPreferences::load()
|
||||
}
|
||||
}
|
||||
|
||||
m_loggingEnabled->setChecked(appSettings->getLoggingEnabled());
|
||||
m_verboseIndexerLoggingEnabled->setChecked(appSettings->getVerboseIndexerLoggingEnabled());
|
||||
m_verboseIndexerLoggingEnabled->setEnabled(m_loggingEnabled->isChecked());
|
||||
|
||||
m_scrollSpeed->setText(QString::number(appSettings->getScrollSpeed(), 'f', 1));
|
||||
m_graphZooming->setChecked(appSettings->getControlsGraphZoomOnMouseWheel());
|
||||
|
||||
@@ -203,9 +192,6 @@ void QtProjectWizzardContentPreferences::save()
|
||||
appSettings->setColorSchemePath(m_colorSchemePaths[m_colorSchemes->currentIndex()]);
|
||||
m_oldColorSchemeIndex = -1;
|
||||
|
||||
appSettings->setLoggingEnabled(m_loggingEnabled->isChecked());
|
||||
appSettings->setVerboseIndexerLoggingEnabled(m_verboseIndexerLoggingEnabled->isChecked());
|
||||
|
||||
float scrollSpeed = m_scrollSpeed->text().toFloat();
|
||||
if (scrollSpeed) appSettings->setScrollSpeed(scrollSpeed);
|
||||
|
||||
@@ -248,11 +234,6 @@ void QtProjectWizzardContentPreferences::javaPathDetectionClicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QtProjectWizzardContentPreferences::loggingEnabledChanged()
|
||||
{
|
||||
m_verboseIndexerLoggingEnabled->setEnabled(m_loggingEnabled->isChecked());
|
||||
}
|
||||
|
||||
void QtProjectWizzardContentPreferences::addJavaPathDetection(QGridLayout* layout, int& row)
|
||||
{
|
||||
std::vector<std::string> detectorNames = m_javaPathDetector->getWorkingDetectorNames();
|
||||
|
||||
@@ -29,7 +29,6 @@ public:
|
||||
private slots:
|
||||
void colorSchemeChanged(int index);
|
||||
void javaPathDetectionClicked();
|
||||
void loggingEnabledChanged();
|
||||
|
||||
private:
|
||||
void addJavaPathDetection(QGridLayout* layout, int& row);
|
||||
@@ -50,8 +49,6 @@ private:
|
||||
QComboBox* m_colorSchemes;
|
||||
std::vector<FilePath> m_colorSchemePaths;
|
||||
int m_oldColorSchemeIndex;
|
||||
QCheckBox* m_loggingEnabled;
|
||||
QCheckBox* m_verboseIndexerLoggingEnabled;
|
||||
|
||||
QLineEdit* m_scrollSpeed;
|
||||
QCheckBox* m_graphZooming;
|
||||
|
||||
Reference in New Issue
Block a user