summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2017-11-15 17:52:19 +0100
committerDominik Holland <dominik.holland@pelagicore.com>2017-11-16 08:01:48 +0000
commit09b5e8eb4baebb58cf84813180b7ff0ab782c113 (patch)
treeefdb8ecbe7d3a8f61beb0400d3bf77e440260cbf
parent2a242aa65f267d010d8c10b8c5da5a1e728d0551 (diff)
downloadneptune-ui-09b5e8eb4baebb58cf84813180b7ff0ab782c113.tar.gz
Reduce the amount of debug output from the Neptune style plugin
Change-Id: Ife29316d0f9f23ba682926ab4ffcb66697e962f9 Reviewed-by: Juergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com>
-rw-r--r--plugins/styles/neptune/neptunestyle.cpp7
-rw-r--r--plugins/styles/neptune/neptunestyleplugin.cpp12
-rw-r--r--plugins/styles/neptune/neptunetheme.cpp3
-rw-r--r--plugins/styles/neptune/neptunetheme.h1
4 files changed, 3 insertions, 20 deletions
diff --git a/plugins/styles/neptune/neptunestyle.cpp b/plugins/styles/neptune/neptunestyle.cpp
index e3352ed..776fe6c 100644
--- a/plugins/styles/neptune/neptunestyle.cpp
+++ b/plugins/styles/neptune/neptunestyle.cpp
@@ -178,10 +178,7 @@ QColor toColor(const QByteArray& data, const QColor& defaultValue)
QString value = QString::fromLocal8Bit(data);
if (value.isEmpty())
return defaultValue;
- QColor color(value);
- if (!color.isValid())
- qWarning() << "Invalid color: " << value;
- return color;
+ return QColor(value);
}
static QByteArray resolveSetting(const QSharedPointer<QSettings> &settings, const QString &name, const QByteArray &env=QByteArray())
@@ -191,8 +188,6 @@ static QByteArray resolveSetting(const QSharedPointer<QSettings> &settings, cons
value = qgetenv(env);
if (value.isNull() && !settings.isNull())
value = settings->value(name).toByteArray();
- if (value.isEmpty())
- qWarning() << "NeptuneStyle settings value is empty: " << name;
return value;
}
diff --git a/plugins/styles/neptune/neptunestyleplugin.cpp b/plugins/styles/neptune/neptunestyleplugin.cpp
index 70dc19b..3aa1a94 100644
--- a/plugins/styles/neptune/neptunestyleplugin.cpp
+++ b/plugins/styles/neptune/neptunestyleplugin.cpp
@@ -40,33 +40,25 @@ Q_LOGGING_CATEGORY(neptuneStyle, "neptune.style")
NeptuneStylePlugin::NeptuneStylePlugin(QObject *parent)
: QQuickStylePlugin(parent)
-{
- qCDebug(neptuneStyle) << "constructor";
-}
+{ }
void NeptuneStylePlugin::registerTypes(const char *uri)
{
- qCDebug(neptuneStyle) << "registerTypes():" << uri;
- // @uri com.pelagicore.styles.neptune
qmlRegisterUncreatableType<NeptuneStyle>(uri, 1, 0, "NeptuneStyle", "NeptuneStyle is an attached property");
}
void NeptuneStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
- qCDebug(neptuneStyle) << "initializeEngine()";
QQuickStylePlugin::initializeEngine(engine, uri);
}
QString NeptuneStylePlugin::name() const
{
- qCDebug(neptuneStyle) << "name()";
return QStringLiteral("neptune");
}
QQuickProxyTheme *NeptuneStylePlugin::createTheme() const
{
- qCDebug(neptuneStyle) << "createTheme()";
+ qCDebug(neptuneStyle) << "Created a NeptuneTheme instance";
return new NeptuneTheme;
}
-
-
diff --git a/plugins/styles/neptune/neptunetheme.cpp b/plugins/styles/neptune/neptunetheme.cpp
index a0778ec..a119f78 100644
--- a/plugins/styles/neptune/neptunetheme.cpp
+++ b/plugins/styles/neptune/neptunetheme.cpp
@@ -35,12 +35,9 @@
#include <QtGui/QFont>
#include <QtGui/QFontInfo>
-Q_LOGGING_CATEGORY(neptuneTheme, "neptune.theme")
-
NeptuneTheme::NeptuneTheme(QPlatformTheme *theme)
{
Q_UNUSED(theme)
- qCDebug(neptuneTheme) << "constructor";
const QFont font(QLatin1String("Source Sans Pro"));
if (QFontInfo(font).family() == QLatin1String("Source Sans Pro")) {
const QString family = font.family();
diff --git a/plugins/styles/neptune/neptunetheme.h b/plugins/styles/neptune/neptunetheme.h
index 3ac50b7..7387f33 100644
--- a/plugins/styles/neptune/neptunetheme.h
+++ b/plugins/styles/neptune/neptunetheme.h
@@ -36,7 +36,6 @@
#include <QtQuickControls2/private/qquickproxytheme_p.h>
#include <QLoggingCategory>
-Q_DECLARE_LOGGING_CATEGORY(neptuneTheme)
class NeptuneTheme : public QQuickProxyTheme
{