Commit 93838d89 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - added log-setting

parent fca870db
......@@ -209,7 +209,7 @@ void WMainWindow::setupGUI()
// This QAction stuff is quite ugly and complicated some times ... There is no nice constructor which takes name, slot keysequence and so on
// directly -> set shortcuts, and some further properties using QAction's interface
QMenu* viewMenu = m_menuBar->addMenu( "View" );
viewMenu->addAction( "Show Menubar", this, SLOT( showMenuBar() ) );
viewMenu->addAction( "Show Menubar", this, SLOT( showMenuBar() ), QKeySequence( Qt::CTRL + Qt::Key_M ) );
viewMenu->addAction( "Show Statusbar", this, SLOT( showStatusBar() ) );
viewMenu->addSeparator();
viewMenu->addAction( "Show Navigation Views", this, SLOT( showNavViews() ) );
......
......@@ -44,7 +44,6 @@
#include "core/common/WConditionOneShot.h"
#include "core/common/WIOTools.h"
#include "core/common/WPathHelper.h"
#include "core/common/WPreferences.h"
#include "core/dataHandler/WDataHandler.h"
#include "core/dataHandler/WSubject.h"
#include "core/graphicsEngine/WGraphicsEngine.h"
......@@ -157,14 +156,9 @@ int WQt4Gui::run()
// setup path helper which provides several paths to others^
WPathHelper::getPathHelper()->setAppPath( walnutBin );
// init preference system
WPreferences::setPreferenceFile( WPathHelper::getConfigFile() );
// get the minimum log level from preferences
std::string logLevel = "Info";
WPreferences::getPreference( "qt4gui.logLevel", &logLevel );
// convert to log-level. If the preference is not defined, the empty string causes logLevelFromString to return LL_DEBUG as default.
WLogger::getLogger()->setDefaultLogLevel( logLevelFromString( logLevel ) );
LogLevel logLevel = static_cast< LogLevel >( WQt4Gui::getSettings().value( "qt4gui/logLevel", LL_INFO ).toInt() );
WLogger::getLogger()->setDefaultLogLevel( logLevel );
// print the first output
wlog::debug( "Walnut" ) << "Walnut binary path: " << walnutBin;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment