From 52528a1f89f953500610c5f8b357437a47f0695d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Fri, 18 May 2018 03:32:36 +0200 Subject: [PATCH] minor --- fm/fm.pro | 2 +- fm/src/bookmarks.cpp | 2 +- fm/src/common.h | 2 +- fm/src/customactionsmanager.cpp | 6 +++--- fm/src/fileutils.cpp | 4 ++-- fm/src/icondlg.cpp | 2 +- fm/src/mainwindow.cpp | 32 ++++++++++++++++---------------- fm/src/mimeutils.cpp | 2 +- fm/src/mymodel.cpp | 2 +- fm/src/processdialog.cpp | 4 ++-- fm/src/settingsdialog.cpp | 8 ++++---- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/fm/fm.pro b/fm/fm.pro index e3a16ca..5cf87dc 100644 --- a/fm/fm.pro +++ b/fm/fm.pro @@ -70,7 +70,7 @@ target.path = $${PREFIX}/bin desktop.files += $${TARGET}.desktop desktop.path += $${PREFIX}/share/applications docs.path += $${DOCDIR}/$${TARGET}-$${VERSION} -docs.files += ../COPYING +docs.files += ../LICENSE ../README.md INSTALLS += target desktop docs exists(../libdisks) { diff --git a/fm/src/bookmarks.cpp b/fm/src/bookmarks.cpp index 2e98bc6..3e759e0 100644 --- a/fm/src/bookmarks.cpp +++ b/fm/src/bookmarks.cpp @@ -50,7 +50,7 @@ bookmarkmodel::bookmarkmodel(QHash *icons) //--------------------------------------------------------------------------- void bookmarkmodel::addBookmark(QString name, QString path, QString isAuto, QString icon, QString mediaPath, bool isMedia, bool changed) { - qDebug() << "add bookmark" << name << path << isAuto << icon << mediaPath << isMedia; + //qDebug() << "add bookmark" << name << path << isAuto << icon << mediaPath << isMedia; if(path.isEmpty() && !isMedia) //add seperator { QStandardItem *item = new QStandardItem(QIcon::fromTheme(icon),""); diff --git a/fm/src/common.h b/fm/src/common.h index ca58eda..1457bc2 100644 --- a/fm/src/common.h +++ b/fm/src/common.h @@ -160,7 +160,7 @@ class Common while (it.hasNext()) { QString found = it.next(); if (found.split("/").takeLast()==desktopFile) { - qDebug() << "found app" << found; + //qDebug() << "found app" << found; return found; } } diff --git a/fm/src/customactionsmanager.cpp b/fm/src/customactionsmanager.cpp index c67646f..9759b70 100644 --- a/fm/src/customactionsmanager.cpp +++ b/fm/src/customactionsmanager.cpp @@ -57,7 +57,7 @@ void CustomActionsManager::freeActions() { */ void CustomActionsManager::readActions() { - qDebug() << "read actions"; + //qDebug() << "read actions"; // Read keys settingsPtr->beginGroup("customActions"); QStringList keys = settingsPtr->childKeys(); @@ -73,7 +73,7 @@ void CustomActionsManager::readActions() { // temp.at(2) - Icon // temp.at(3) - Command QStringList temp(settingsPtr->value(keys.at(i)).toStringList()); - qDebug() << "loaded custom action" << temp; + //qDebug() << "loaded custom action" << temp; // Create new action and read it QAction *act = new QAction(QIcon::fromTheme(temp.at(2)), temp.at(1), this); @@ -143,7 +143,7 @@ QList* CustomActionsManager::getActionList() const { */ void CustomActionsManager::execAction(const QString &cmd, const QString &path) { - qDebug() << "custom action" << cmd << path; + //qDebug() << "custom action" << cmd << path; // Retrieve executable name from splitted command, the rest is arguments QStringList temp = cmd.split(" "); QString exec = temp.at(0); diff --git a/fm/src/fileutils.cpp b/fm/src/fileutils.cpp index 0f1d55d..f04e685 100644 --- a/fm/src/fileutils.cpp +++ b/fm/src/fileutils.cpp @@ -110,7 +110,7 @@ QStringList FileUtils::getApplicationNames() { appNames.append(it1.fileName()); } } - qDebug() << "applications names" << appNames; + //qDebug() << "applications names" << appNames; return appNames; } //--------------------------------------------------------------------------- @@ -162,7 +162,7 @@ QString FileUtils::getRealSuffix(const QString &name) { * @return icon */ QIcon FileUtils::searchMimeIcon(QString mime, const QIcon &defaultIcon) { - qDebug() << "search mime icon" << mime << QIcon::themeName(); + //qDebug() << "search mime icon" << mime << QIcon::themeName(); QIcon icon = QIcon::fromTheme(mime.replace("/", "-")); if (icon.isNull()) { if (mime.startsWith("image")) { diff --git a/fm/src/icondlg.cpp b/fm/src/icondlg.cpp index 1c6c216..54f8532 100644 --- a/fm/src/icondlg.cpp +++ b/fm/src/icondlg.cpp @@ -63,7 +63,7 @@ icondlg::icondlg() void icondlg::scanTheme() { foreach(QString theme, themes) { - qDebug() << theme; + //qDebug() << theme; for (int i=0;ivalue("clearCache").toBool()) { - qDebug() << "clear cache"; + //qDebug() << "clear cache"; Common::removeFileCache(); Common::removeFolderCache(); settings->setValue("clearCache", false); @@ -103,9 +103,9 @@ MainWindow::MainWindow() themes << QString("%1/../share/icons/hicolor").arg(qApp->applicationFilePath()); themes << "/usr/share/icons/hicolor" << "/usr/local/share/icons/hicolor"; for (int i=0;isetValue("fallbackTheme", temp); } } QIcon::setThemeName(temp); - qDebug() << "using icon theme" << QIcon::themeName(); + //qDebug() << "using icon theme" << QIcon::themeName(); // Create mime utils mimeUtils = new MimeUtils(this); @@ -489,7 +489,7 @@ void MainWindow::loadSettings() { void MainWindow::firstRunBookmarks(bool isFirstRun) { if (!isFirstRun) { return; } - qDebug() << "first run, setup default bookmarks"; + //qDebug() << "first run, setup default bookmarks"; modelBookmarks->addBookmark(tr("Computer"), "/", "", "computer", "", false, false); modelBookmarks->addBookmark(tr("Home"), QDir::homePath(), "", "user-home", "", false, false); modelBookmarks->addBookmark(tr("Desktop"), QString("%1/Desktop").arg(QDir::homePath()), "", "user-desktop", "", false, false); @@ -505,7 +505,7 @@ void MainWindow::firstRunBookmarks(bool isFirstRun) void MainWindow::loadBookmarks() { - qDebug() << "load bookmarks"; + //qDebug() << "load bookmarks"; settings->beginGroup("bookmarks"); foreach (QString key,settings->childKeys()) { QStringList temp(settings->value(key).toStringList()); @@ -516,7 +516,7 @@ void MainWindow::loadBookmarks() void MainWindow::writeBookmarks() { - qDebug() << "write bookmarks"; + //qDebug() << "write bookmarks"; settings->remove("bookmarks"); settings->beginGroup("bookmarks"); for (int i = 0; i < modelBookmarks->rowCount(); i++) { @@ -533,7 +533,7 @@ void MainWindow::writeBookmarks() void MainWindow::handleBookmarksChanged() { - qDebug() << "bookmarks changed, save"; + //qDebug() << "bookmarks changed, save"; QTimer::singleShot(1000, this, SLOT(writeBookmarks())); } //--------------------------------------------------------------------------- @@ -1204,14 +1204,14 @@ void MainWindow::contextMenuEvent(QContextMenuEvent * event) { // File if (!curIndex.isDir()) { QString type = modelList->getMimeType(modelList->index(curIndex.filePath())); - qDebug() << "type" << type; + //qDebug() << "type" << type; // Add custom actions to the list of actions - qDebug() << "add custom actions"; + //qDebug() << "add custom actions"; QHashIterator i(*customActManager->getActions()); while (i.hasNext()) { i.next(); - qDebug() << "custom action" << i.key() << i.value(); + //qDebug() << "custom action" << i.key() << i.value(); if (type.contains(i.key())) actions.append(i.value()); } @@ -1397,7 +1397,7 @@ void MainWindow::contextMenuEvent(QContextMenuEvent * event) { */ QMenu* MainWindow::createOpenWithMenu() { - qDebug() << "open with"; + //qDebug() << "open with"; // Add open with functionality ... QMenu *openMenu = new QMenu(tr("Open with")); @@ -1411,7 +1411,7 @@ QMenu* MainWindow::createOpenWithMenu() { QString mime = mimeUtils->getMimeType(curIndex.filePath()); QStringList appNames = mimeUtils->getDefault(mime); - qDebug() << mime << appNames; + //qDebug() << mime << appNames; // Create actions for opening QList defaultApps; @@ -1534,7 +1534,7 @@ void MainWindow::handleMediaRemoved(QString path) void MainWindow::handleMediaChanged(QString path, bool present) { - qDebug() << "changed" << path << present; + //qDebug() << "changed" << path << present; if (path.isEmpty()) { return; } if (disks->devices[path]->isOptical && !present && mediaBookmarkExists(path)>-1) { handleMediaRemoved(path); @@ -1545,7 +1545,7 @@ void MainWindow::handleMediaChanged(QString path, bool present) void MainWindow::handleMediaUnmount() { - qDebug() << "handle media unmount"; + //qDebug() << "handle media unmount"; QStandardItem *item = modelBookmarks->itemFromIndex(bookmarksList->currentIndex()); if (item == NULL) { return; } QString path = item->data(MEDIA_PATH).toString(); @@ -1555,7 +1555,7 @@ void MainWindow::handleMediaUnmount() void MainWindow::handleMediaEject() { - qDebug() << "handle media eject"; + //qDebug() << "handle media eject"; QStandardItem *item = modelBookmarks->itemFromIndex(bookmarksList->currentIndex()); if (item == NULL) { return; } QString path = item->data(MEDIA_PATH).toString(); diff --git a/fm/src/mimeutils.cpp b/fm/src/mimeutils.cpp index 20783b8..7ec6367 100644 --- a/fm/src/mimeutils.cpp +++ b/fm/src/mimeutils.cpp @@ -69,7 +69,7 @@ QString MimeUtils::getMimeType(const QString &path) { */ QStringList MimeUtils::getMimeTypes() const { QStringList result = Common::getMimeTypes(); - qDebug() << "getMimeTypes" << result; + //qDebug() << "getMimeTypes" << result; return result; } //--------------------------------------------------------------------------- diff --git a/fm/src/mymodel.cpp b/fm/src/mymodel.cpp index a2bea71..2308c83 100644 --- a/fm/src/mymodel.cpp +++ b/fm/src/mymodel.cpp @@ -228,7 +228,7 @@ QString myModel::getMimeType(const QModelIndex &index) if(item->mMimeType.isNull()) item->mMimeType = "file"; } } - qDebug() << "item mime" << item->absoluteFilePath() << item->mMimeType; + //qDebug() << "item mime" << item->absoluteFilePath() << item->mMimeType; return item->mMimeType; } diff --git a/fm/src/processdialog.cpp b/fm/src/processdialog.cpp index 6689f3f..9cca73d 100644 --- a/fm/src/processdialog.cpp +++ b/fm/src/processdialog.cpp @@ -76,7 +76,7 @@ ProcessDialog::ProcessDialog(QProcess* proc, const QString &procName, */ void ProcessDialog::onProcFinished() { //this->hide(); - qDebug() << "proc finished"; + //qDebug() << "proc finished"; this->deleteLater(); } //--------------------------------------------------------------------------- @@ -85,7 +85,7 @@ void ProcessDialog::onProcFinished() { * @brief Reaction on process start */ void ProcessDialog::onProcStarted() { - qDebug() << "proc started"; + //qDebug() << "proc started"; this->show(); } //--------------------------------------------------------------------------- diff --git a/fm/src/settingsdialog.cpp b/fm/src/settingsdialog.cpp index 0c64722..d1585b2 100644 --- a/fm/src/settingsdialog.cpp +++ b/fm/src/settingsdialog.cpp @@ -639,7 +639,7 @@ void SettingsDialog::readShortcuts() { */ void SettingsDialog::loadMimes(int section) { - qDebug() << "LOAD MIMES"; + //qDebug() << "LOAD MIMES"; // Mime progress section const int MIME_PROGRESS_SECTION = 3; @@ -656,7 +656,7 @@ void SettingsDialog::loadMimes(int section) { // Load list of mimes QStringList mimes = mimeUtilsPtr->getMimeTypes(); - qDebug() << "mimes" << mimes; + //qDebug() << "mimes" << mimes; // Init process progressMime->setRange(1, mimes.size()); @@ -726,7 +726,7 @@ void SettingsDialog::loadMimes(int section) { */ bool SettingsDialog::saveSettings() { - qDebug() << "save settings dialog"; + //qDebug() << "save settings dialog"; // General settings // ------------------------------------------------------------------------ settingsPtr->setValue("showThumbs", checkThumbs->isChecked()); @@ -737,7 +737,7 @@ bool SettingsDialog::saveSettings() { if (cmbIconTheme->currentText() != settingsPtr->value("fallbackTheme").toString()) { //QIcon::setThemeName(cmbIconTheme->currentText()); settingsPtr->setValue("clearCache", true); - QMessageBox::warning(this, tr("Restart to apply settings"), tr("You must restart to apply theme settings")); + QMessageBox::warning(this, tr("Restart to apply settings"), tr("You must restart application to apply theme settings")); } settingsPtr->setValue("fallbackTheme", cmbIconTheme->currentText()); settingsPtr->setValue("defMimeAppsFile", cmbDefaultMimeApps->currentText());