From f29a2e57ec5e9fb64fa58b5e1a40aa0d50ea033a Mon Sep 17 00:00:00 2001 From: Herwig Birke Date: Tue, 4 Feb 2020 10:39:01 +0100 Subject: [PATCH] initial commit --- cfilebrowser.cpp | 8 +++++++- cmainwindow.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cfilebrowser.cpp b/cfilebrowser.cpp index 67d5f4c..19cc9aa 100644 --- a/cfilebrowser.cpp +++ b/cfilebrowser.cpp @@ -48,7 +48,13 @@ cFileBrowser::cFileBrowser(QProgressBar* lpProgressBar, QList* lpIm m_cacheDB.open(); if(!m_cacheDB.open()) - return; + { + QDir dir(userDir()); + dir.mkpath(userDir()); + + if(!m_cacheDB.open()) + return; + } QSqlQuery query(m_cacheDB); diff --git a/cmainwindow.cpp b/cmainwindow.cpp index 67f5546..732957a 100644 --- a/cmainwindow.cpp +++ b/cmainwindow.cpp @@ -16,7 +16,7 @@ cMainWindow::cMainWindow(cSplashScreen* lpSplashScreen, QWidget *parent) : QMainWindow(parent), ui(new Ui::cMainWindow), m_lpSplashScreen(lpSplashScreen), - m_lpFileBrowser(0) + m_lpFileBrowser(nullptr) { setImageFormats();