diff options
-rw-r--r-- | filesystemwidget.cpp | 8 | ||||
-rw-r--r-- | newpicsdialog.cpp | 6 | ||||
-rw-r--r-- | smdirmodel.h | 1 | ||||
-rw-r--r-- | smdirwatcher.cpp | 1 | ||||
-rw-r--r-- | smdirwatcher.h | 4 |
5 files changed, 4 insertions, 16 deletions
diff --git a/filesystemwidget.cpp b/filesystemwidget.cpp index 79ef2ab..4c05640 100644 --- a/filesystemwidget.cpp +++ b/filesystemwidget.cpp @@ -163,7 +163,6 @@ void FilesystemWidget::directoryEdited(){ } void FilesystemWidget::fileViewActivated(const QModelIndex &idx){ - QMutexLocker l(&mFileModel->collector()->hold()); QModelIndex real = mFileProxy->mapToSource(idx); if(mFileModel->isDir(real)){ if(idx.data().toString() == ".."){ @@ -217,7 +216,6 @@ void FilesystemWidget::goBack(){ } void FilesystemWidget::deleteFiles(){ - QMutexLocker l(&mFileModel->collector()->hold()); QSortFilterProxyModel *proxy = qobject_cast<QSortFilterProxyModel*>(mFileView->model()); QModelIndexList selected = mFileView->selectionModel()->selectedRows(); if(selected.isEmpty()){ @@ -235,7 +233,6 @@ void FilesystemWidget::deleteFiles(){ } void FilesystemWidget::toClipboard(int clipmode){ - QMutexLocker l(&mFileModel->collector()->hold()); mClipboardMode = clipmode; QClipboard *clip = qApp->clipboard(); QModelIndexList selected = mFileView->selectionModel()->selectedRows(); @@ -312,7 +309,6 @@ void FilesystemWidget::playSelected(const QString &player){ } void FilesystemWidget::readSettings(){ - QMutexLocker l(&mFileModel->collector()->hold()); QSettings s; QStringList expandedDirs = s.value("paths/expandeddirs").toStringList(); if(expandedDirs.isEmpty()){ @@ -341,7 +337,6 @@ void FilesystemWidget::readSettings(){ } void FilesystemWidget::writeSettings(){ - QMutexLocker l(&mFileModel->collector()->hold()); QSettings s; s.setValue("paths/expandeddirs", mExpandedDirs); QModelIndex currentDir = mDirView->selectionModel()->currentIndex(); @@ -361,7 +356,6 @@ void FilesystemWidget::configChanged(){ } void FilesystemWidget::dvdMount(){ - QMutexLocker l(&mFileModel->collector()->hold()); QSettings s; QString mountDir = s.value("paths/dvdmount").toString(); if(isMounted()){ @@ -420,7 +414,6 @@ void FilesystemWidget::selectAllPV(){ } void FilesystemWidget::setWindowTitle(){ - QMutexLocker l(&mFileModel->collector()->hold()); QModelIndex curIdx = mDirView->selectionModel()->currentIndex(); QString dir = curIdx.data(QFileSystemModel::FilePathRole).toString(); mWindowTitle = QString(tr("Filemanager - [%1]")).arg(dir); @@ -508,7 +501,6 @@ void FilesystemWidget::copyRecursive(const QFileInfo &start, const QString &dest } const QString FilesystemWidget::selectedDir(){ - QMutexLocker l(&mFileModel->collector()->hold()); const QModelIndexList selected = mDirView->selectionModel()->selectedRows(); if(!selected.isEmpty()){ return selected.at(0).data(QFileSystemModel::FilePathRole).toString(); diff --git a/newpicsdialog.cpp b/newpicsdialog.cpp index 1914219..31e14c4 100644 --- a/newpicsdialog.cpp +++ b/newpicsdialog.cpp @@ -7,10 +7,10 @@ #include <QSqlQuery> #include <QSortFilterProxyModel> -#include <QPushButton> +#include <QtWidgets/QPushButton> #include <QSettings> -#include <QFileDialog> -#include <QVBoxLayout> +#include <QtWidgets/QFileDialog> +#include <QtWidgets/QVBoxLayout> #include "newpicsdialog.h" #include "smtreeitem.h" diff --git a/smdirmodel.h b/smdirmodel.h index 1c7e9b2..21aab40 100644 --- a/smdirmodel.h +++ b/smdirmodel.h @@ -34,7 +34,6 @@ class SmDirModel : public SmTreeModel { QDir dir() const; QFileInfo fileInfo(const QModelIndex &idx) const; QTimer *refresTimer() { return mRefreshTimer; } - SmDataColletor *collector() { return mCollector; } public slots: void setDir(const QString &dir); diff --git a/smdirwatcher.cpp b/smdirwatcher.cpp index 83e0efa..371e7cf 100644 --- a/smdirwatcher.cpp +++ b/smdirwatcher.cpp @@ -118,7 +118,6 @@ void SmDataColletor::setCheckForPresent(bool present){ void SmDataColletor::run(){ forever { - QMutexLocker l(&mHoldMx); mSemUsed->acquire(); if(mCancel){ QSqlDatabase::database("collectordb").close(); diff --git a/smdirwatcher.h b/smdirwatcher.h index dcfc714..77d0d97 100644 --- a/smdirwatcher.h +++ b/smdirwatcher.h @@ -1,4 +1,4 @@ -/* + /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version @@ -54,7 +54,6 @@ class SmDataColletor : public QThread { public: explicit SmDataColletor(const int numFields, QObject *parent = 0); void init(QSemaphore *set, QSemaphore *get, QQueue<QPair<QString, SmDirWatcher::DWEvent> > *data); - QMutex &hold() { return mHoldMx; } public slots: void setCheckForPresent(bool present); @@ -78,7 +77,6 @@ class SmDataColletor : public QThread { bool mCheckForPresent; bool mCancel; QMutex mCheckForPresentMx; - QMutex mHoldMx; QSqlQuery *mPicPresentQ; QSqlQuery *mMovPresentQ; }; |