summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-22 12:29:46 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-04-22 12:38:59 -0700
commit2182f00177a62c8ca76ccfb7f39f4d564b70389c (patch)
treec14a2f6a0c1afaae555c34458f0a3e60503b2d6c
parentbc6c8a3949d578e0b9be2ce5badf2ff54e9c2470 (diff)
downloadsubsurface-2182f00177a62c8ca76ccfb7f39f4d564b70389c.tar.gz
Reduce default verbosity
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--core/pluginmanager.cpp7
-rw-r--r--core/save-git.c2
-rw-r--r--desktop-widgets/mainwindow.cpp6
3 files changed, 11 insertions, 4 deletions
diff --git a/core/pluginmanager.cpp b/core/pluginmanager.cpp
index 28c978280..880ba2a0e 100644
--- a/core/pluginmanager.cpp
+++ b/core/pluginmanager.cpp
@@ -7,6 +7,9 @@
static QList<ISocialNetworkIntegration*> _socialNetworks;
+// no point in including dive.h for this
+extern int verbose;
+
PluginManager& PluginManager::instance()
{
static PluginManager self;
@@ -33,7 +36,9 @@ void PluginManager::loadPlugins()
#endif
pluginsDir.cd("plugins");
- qDebug() << "Plugins Directory: " << pluginsDir;
+ if (verbose)
+ qDebug() << "Plugins Directory: " << pluginsDir;
+
foreach (const QString& fileName, pluginsDir.entryList(QDir::Files)) {
QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
QObject *plugin = loader.instance();
diff --git a/core/save-git.c b/core/save-git.c
index cfcd3627c..30cb2972f 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -1107,7 +1107,7 @@ static int create_new_commit(git_repository *repo, const char *remote, const cha
return report_error("Unable to look up parent in branch '%s'", branch);
if (saved_git_id) {
- if (existing_filename)
+ if (existing_filename && verbose)
fprintf(stderr, "existing filename %s\n", existing_filename);
const git_oid *id = git_commit_id((const git_commit *) parent);
/* if we are saving to the same git tree we got this from, let's make
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 506878c98..afb2f9c77 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -559,7 +559,8 @@ void MainWindow::on_actionCloudstorageopen_triggered()
getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
return;
}
- qDebug() << filename;
+ if (verbose)
+ qDebug() << "Opening cloud storage from:" << filename;
closeCurrentFile();
@@ -586,7 +587,8 @@ void MainWindow::on_actionCloudstoragesave_triggered()
getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
return;
}
- qDebug() << filename;
+ if (verbose)
+ qDebug() << "Saving cloud storage to:" << filename;
if (information()->isEditing())
information()->acceptChanges();