- more work on refactoring

This commit is contained in:
Dmytro Bogovych 2020-10-04 07:29:47 +03:00
parent 93c998ca1c
commit 682062b5e3
3 changed files with 24 additions and 26 deletions

View File

@ -6,8 +6,8 @@ set (CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment v
project (outliner C CXX) # Your project name project (outliner C CXX) # Your project name
if (NOT LIB_PLATFORM) if (NOT LIB_PLATFORM)
message("No LIB_PLATFORM is set, defaulting to works/sevana/platform/libraries") message("No LIB_PLATFORM is set, defaulting to works/sevana/libraries")
set (LIB_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/../../../sevana/platform/libraries) set (LIB_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/../../../sevana/libraries)
endif() endif()
include (${LIB_PLATFORM}/platform_libs.cmake) include (${LIB_PLATFORM}/platform_libs.cmake)
@ -61,7 +61,7 @@ set (SOURCES
finddialog.cpp finddialog.cpp
findsupport.cpp findsupport.cpp
helper.cpp helper.cpp
initial_ui.cpp # initial_ui.cpp
logger.cpp logger.cpp
main.cpp main.cpp
mainwindow.cpp mainwindow.cpp
@ -102,7 +102,7 @@ set (HEADERS
finddialog.h finddialog.h
findsupport.h findsupport.h
helper.h helper.h
initial_ui.h # initial_ui.h
logger.h logger.h
mainwindow.h mainwindow.h
#moc_predefs.h #moc_predefs.h

View File

@ -1,2 +1,2 @@
// Auto generated file ! Please do not edit ! // Auto generated file ! Please do not edit !
#define APP_BUILD_NUMBER 74 #define APP_BUILD_NUMBER 88

View File

@ -64,12 +64,28 @@ MainWindow::MainWindow(QWidget *parent) :
loadGeometry(); loadGeometry();
this->setUpdatesEnabled(true);
}
MainWindow::~MainWindow()
{
delete ui;
//delete mCurrentIntervalLabel;
}
void MainWindow::attachDatabase()
{
// Find default database file exists // Find default database file exists
QString path = helper::path::pathToDatabase(); QString path = helper::path::pathToDatabase();
// Find optional custom path to database // Find optional custom path to database
if (mSettings->data()[KEY_DB_FILENAME_SPECIFIED].toBool()) if (mSettings->data()[KEY_DB_FILENAME_SPECIFIED].toBool())
{
path = mSettings->data()[KEY_DB_FILENAME].toString(); path = mSettings->data()[KEY_DB_FILENAME].toString();
if (path.contains("~"))
path.replace("~", QDir::homePath());
}
QString folder = QFileInfo(path).absoluteDir().path(); QString folder = QFileInfo(path).absoluteDir().path();
Storage::instance().setPath(path); Storage::instance().setPath(path);
@ -97,26 +113,6 @@ MainWindow::MainWindow(QWidget *parent) :
else else
askDbPassword(QString()); askDbPassword(QString());
} }
this->setUpdatesEnabled(true);
}
MainWindow::~MainWindow()
{
delete ui;
//delete mCurrentIntervalLabel;
}
void MainWindow::attachDatabase()
{
// Open database
QString path = helper::path::pathToDatabase();
if (mSettings->data()[KEY_DB_FILENAME_SPECIFIED].toBool())
path = mSettings->data()[KEY_DB_FILENAME].toString();
QString folder = QFileInfo(path).absoluteDir().path();
Storage::instance().setPath(path);
this->setUpdatesEnabled(true); this->setUpdatesEnabled(true);
} }
@ -261,6 +257,8 @@ void MainWindow::initClient()
#endif #endif
mTimeFrameHeight = 64;//ui->mTimeFrame->height(); mTimeFrameHeight = 64;//ui->mTimeFrame->height();
ui->mStartRecentTaskMenu->setEnabled(false); ui->mStartRecentTaskMenu->setEnabled(false);
buildOpenOrCreateView();
} }
void MainWindow::save() void MainWindow::save()