Reduce default verbosity

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-04-22 12:29:46 -07:00
parent bc6c8a3949
commit 2182f00177
3 changed files with 11 additions and 4 deletions

View file

@ -7,6 +7,9 @@
static QList<ISocialNetworkIntegration*> _socialNetworks; static QList<ISocialNetworkIntegration*> _socialNetworks;
// no point in including dive.h for this
extern int verbose;
PluginManager& PluginManager::instance() PluginManager& PluginManager::instance()
{ {
static PluginManager self; static PluginManager self;
@ -33,7 +36,9 @@ void PluginManager::loadPlugins()
#endif #endif
pluginsDir.cd("plugins"); pluginsDir.cd("plugins");
if (verbose)
qDebug() << "Plugins Directory: " << pluginsDir; qDebug() << "Plugins Directory: " << pluginsDir;
foreach (const QString& fileName, pluginsDir.entryList(QDir::Files)) { foreach (const QString& fileName, pluginsDir.entryList(QDir::Files)) {
QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
QObject *plugin = loader.instance(); QObject *plugin = loader.instance();

View file

@ -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); return report_error("Unable to look up parent in branch '%s'", branch);
if (saved_git_id) { if (saved_git_id) {
if (existing_filename) if (existing_filename && verbose)
fprintf(stderr, "existing filename %s\n", existing_filename); fprintf(stderr, "existing filename %s\n", existing_filename);
const git_oid *id = git_commit_id((const git_commit *) parent); 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 /* if we are saving to the same git tree we got this from, let's make

View file

@ -559,7 +559,8 @@ void MainWindow::on_actionCloudstorageopen_triggered()
getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error); getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
return; return;
} }
qDebug() << filename; if (verbose)
qDebug() << "Opening cloud storage from:" << filename;
closeCurrentFile(); closeCurrentFile();
@ -586,7 +587,8 @@ void MainWindow::on_actionCloudstoragesave_triggered()
getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error); getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
return; return;
} }
qDebug() << filename; if (verbose)
qDebug() << "Saving cloud storage to:" << filename;
if (information()->isEditing()) if (information()->isEditing())
information()->acceptChanges(); information()->acceptChanges();