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();