summaryrefslogtreecommitdiffstats
path: root/consistencycheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'consistencycheck.cpp')
-rw-r--r--consistencycheck.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/consistencycheck.cpp b/consistencycheck.cpp
index 52427a2..24d128c 100644
--- a/consistencycheck.cpp
+++ b/consistencycheck.cpp
@@ -28,7 +28,7 @@
#include "consistencycheck.h"
#include "helper.h"
-ConsistencyCheck::ConsistencyCheck(QWidget *parent, Qt::WindowFlags f) : SmDialog(parent, f), mChecker(0){
+ConsistencyCheck::ConsistencyCheck(QWidget *parent, Qt::WindowFlags f) : SmDialog(parent, f), mChecker(nullptr){
// setup widget
// OK
QGroupBox *okBox = new QGroupBox(tr("Ok"));
@@ -64,7 +64,7 @@ ConsistencyCheck::ConsistencyCheck(QWidget *parent, Qt::WindowFlags f) : SmDialo
mCheckFs = new QPushButton(tr("Check Filesystem"));
connect(mCheckFs, &QPushButton::clicked, [=] { startChecker(ConsistencyCheck::FsCheck); });
mCleanup = new QPushButton(tr("Cleanup..."));
- connect(mCleanup, SIGNAL(clicked()), this, SLOT(cleanup()));
+ connect(mCleanup, &QPushButton::clicked, this, &ConsistencyCheck::cleanup);
mCleanup->setEnabled(false);
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addWidget(mCheckDb);
@@ -374,12 +374,12 @@ void ConsistencyChecker::dbCheck(){
mStrayPicIds.clear();
mStrayPicsIdMutex.unlock();
QSqlQuery numFilesQ("SELECT COUNT(*) FROM files", mDb);
- int numFiles;
+ int numFiles = 0;
while(numFilesQ.next()){
numFiles = numFilesQ.value(0).toInt();
}
QSqlQuery numPicsQ("SELECT COUNT(*) FROM pics", mDb);
- int numPics;
+ int numPics = 0;
while(numPicsQ.next()){
numPics = numPicsQ.value(0).toInt();
}