Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed May 18, 2018
1 parent b613444 commit 52528a1
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion fm/fm.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion fm/src/bookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ bookmarkmodel::bookmarkmodel(QHash<QString, QIcon> *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),"");
Expand Down
2 changes: 1 addition & 1 deletion fm/src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
6 changes: 3 additions & 3 deletions fm/src/customactionsmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down Expand Up @@ -143,7 +143,7 @@ QList<QAction*>* 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);
Expand Down
4 changes: 2 additions & 2 deletions fm/src/fileutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ QStringList FileUtils::getApplicationNames() {
appNames.append(it1.fileName());
}
}
qDebug() << "applications names" << appNames;
//qDebug() << "applications names" << appNames;
return appNames;
}
//---------------------------------------------------------------------------
Expand Down Expand Up @@ -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")) {
Expand Down
2 changes: 1 addition & 1 deletion fm/src/icondlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ icondlg::icondlg()
void icondlg::scanTheme()
{
foreach(QString theme, themes) {
qDebug() << theme;
//qDebug() << theme;
for (int i=0;i<Common::iconLocations().size();++i) {
QDirIterator it(Common::iconLocations().at(i) + "/" + theme, QStringList("*.png"), QDir::Files | QDir::NoDotAndDotDot | QDir::NoSymLinks, QDirIterator::Subdirectories);
while (it.hasNext()) {
Expand Down
32 changes: 16 additions & 16 deletions fm/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ MainWindow::MainWindow()
settings = new QSettings();

if (settings->value("clearCache").toBool()) {
qDebug() << "clear cache";
//qDebug() << "clear cache";
Common::removeFileCache();
Common::removeFolderCache();
settings->setValue("clearCache", false);
Expand Down Expand Up @@ -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;i<themes.size();++i) {
qDebug() << "checking for icon theme ..." << themes.at(i);
//qDebug() << "checking for icon theme ..." << themes.at(i);
if (QFile::exists(themes.at(i))) {
qDebug() << "found icon theme" << themes.at(i);
//qDebug() << "found icon theme" << themes.at(i);
temp = QString(themes.at(i)).split("/").takeLast();
break;
}
Expand All @@ -114,7 +114,7 @@ MainWindow::MainWindow()
if (temp!="hicolor") { settings->setValue("fallbackTheme", temp); }
}
QIcon::setThemeName(temp);
qDebug() << "using icon theme" << QIcon::themeName();
//qDebug() << "using icon theme" << QIcon::themeName();

// Create mime utils
mimeUtils = new MimeUtils(this);
Expand Down Expand Up @@ -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);
Expand All @@ -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());
Expand All @@ -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++) {
Expand All @@ -533,7 +533,7 @@ void MainWindow::writeBookmarks()

void MainWindow::handleBookmarksChanged()
{
qDebug() << "bookmarks changed, save";
//qDebug() << "bookmarks changed, save";
QTimer::singleShot(1000, this, SLOT(writeBookmarks()));
}
//---------------------------------------------------------------------------
Expand Down Expand Up @@ -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<QString, QAction*> 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());
}

Expand Down Expand Up @@ -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"));

Expand All @@ -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<QAction*> defaultApps;
Expand Down Expand Up @@ -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);
Expand All @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion fm/src/mimeutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
//---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion fm/src/mymodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions fm/src/processdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ProcessDialog::ProcessDialog(QProcess* proc, const QString &procName,
*/
void ProcessDialog::onProcFinished() {
//this->hide();
qDebug() << "proc finished";
//qDebug() << "proc finished";
this->deleteLater();
}
//---------------------------------------------------------------------------
Expand All @@ -85,7 +85,7 @@ void ProcessDialog::onProcFinished() {
* @brief Reaction on process start
*/
void ProcessDialog::onProcStarted() {
qDebug() << "proc started";
//qDebug() << "proc started";
this->show();
}
//---------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions fm/src/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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());
Expand Down Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit 52528a1

Please sign in to comment.