- 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
if (NOT LIB_PLATFORM)
message("No LIB_PLATFORM is set, defaulting to works/sevana/platform/libraries")
set (LIB_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/../../../sevana/platform/libraries)
message("No LIB_PLATFORM is set, defaulting to works/sevana/libraries")
set (LIB_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/../../../sevana/libraries)
endif()
include (${LIB_PLATFORM}/platform_libs.cmake)
@ -61,7 +61,7 @@ set (SOURCES
finddialog.cpp
findsupport.cpp
helper.cpp
initial_ui.cpp
# initial_ui.cpp
logger.cpp
main.cpp
mainwindow.cpp
@ -102,7 +102,7 @@ set (HEADERS
finddialog.h
findsupport.h
helper.h
initial_ui.h
# initial_ui.h
logger.h
mainwindow.h
#moc_predefs.h
@ -166,7 +166,7 @@ if (TARGET_LINUX)
endif()
if(TARGET_OSX)
message("MacOS build target")
message ("MacOS build target")
# OS X Specific flags
add_definitions(-DTARGET_OSX)

View File

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