aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-14 23:30:36 +0200
committerMontel Laurent <[email protected]>2017-04-14 23:30:36 +0200
commit32ece34d9692b739834291b9143757ddca3253be (patch)
treece79f2d2fbe360f0f6114f1d630b0f96f05b9b86
parentb343be0e77c292a714da0b201722b43c35edf43c (diff)
Fix coding style
-rw-r--r--autotests/gravatarcachetest.cpp2
-rw-r--r--autotests/gravatarconfiguresettingsdialogtest.cpp2
-rw-r--r--autotests/gravatarconfigwidgettest.cpp2
-rw-r--r--autotests/gravatardownloadpixmapdialogtest.cpp2
-rw-r--r--autotests/gravatardownloadpixmapwidgettest.cpp2
-rw-r--r--autotests/gravatarresolvurljobtest.cpp8
-rw-r--r--src/job/gravatarresolvurljob.cpp23
-rw-r--r--src/job/gravatarresolvurljob.h3
-rw-r--r--src/misc/gravatarcache.cpp3
-rw-r--r--src/misc/gravatarcache.h3
-rw-r--r--src/widgets/gravatarconfiguresettingsdialog.cpp1
-rw-r--r--src/widgets/gravatarconfiguresettingsdialog.h3
-rw-r--r--src/widgets/gravatarconfigwidget.cpp10
-rw-r--r--src/widgets/gravatarconfigwidget.h3
-rw-r--r--src/widgets/gravatardownloadpixmapdialog.cpp1
-rw-r--r--src/widgets/gravatardownloadpixmapdialog.h3
-rw-r--r--src/widgets/gravatardownloadpixmapwidget.cpp1
-rw-r--r--src/widgets/gravatardownloadpixmapwidget.h3
-rw-r--r--tests/gravatarwidget_gui.cpp1
19 files changed, 26 insertions, 50 deletions
diff --git a/autotests/gravatarcachetest.cpp b/autotests/gravatarcachetest.cpp
index 9b1e7b5..b9c692b 100644
--- a/autotests/gravatarcachetest.cpp
+++ b/autotests/gravatarcachetest.cpp
@@ -25,12 +25,10 @@
GravatarCacheTest::GravatarCacheTest(QObject *parent)
: QObject(parent)
{
-
}
GravatarCacheTest::~GravatarCacheTest()
{
-
}
void GravatarCacheTest::shouldHaveDefaultValue()
diff --git a/autotests/gravatarconfiguresettingsdialogtest.cpp b/autotests/gravatarconfiguresettingsdialogtest.cpp
index ec2b385..0ad0306 100644
--- a/autotests/gravatarconfiguresettingsdialogtest.cpp
+++ b/autotests/gravatarconfiguresettingsdialogtest.cpp
@@ -29,12 +29,10 @@
GravatarConfigureSettingsDialogTest::GravatarConfigureSettingsDialogTest(QObject *parent)
: QObject(parent)
{
-
}
GravatarConfigureSettingsDialogTest::~GravatarConfigureSettingsDialogTest()
{
-
}
void GravatarConfigureSettingsDialogTest::shouldHaveDefaultValue()
diff --git a/autotests/gravatarconfigwidgettest.cpp b/autotests/gravatarconfigwidgettest.cpp
index c0d261c..c86c0dd 100644
--- a/autotests/gravatarconfigwidgettest.cpp
+++ b/autotests/gravatarconfigwidgettest.cpp
@@ -32,12 +32,10 @@
GravatarConfigWidgetTest::GravatarConfigWidgetTest(QObject *parent)
: QObject(parent)
{
-
}
GravatarConfigWidgetTest::~GravatarConfigWidgetTest()
{
-
}
void GravatarConfigWidgetTest::shouldHaveDefaultValue()
diff --git a/autotests/gravatardownloadpixmapdialogtest.cpp b/autotests/gravatardownloadpixmapdialogtest.cpp
index a00aa95..53568d2 100644
--- a/autotests/gravatardownloadpixmapdialogtest.cpp
+++ b/autotests/gravatardownloadpixmapdialogtest.cpp
@@ -28,12 +28,10 @@
GravatarDownloadPixmapDialogTest::GravatarDownloadPixmapDialogTest(QObject *parent)
: QObject(parent)
{
-
}
GravatarDownloadPixmapDialogTest::~GravatarDownloadPixmapDialogTest()
{
-
}
void GravatarDownloadPixmapDialogTest::initTestCase()
diff --git a/autotests/gravatardownloadpixmapwidgettest.cpp b/autotests/gravatardownloadpixmapwidgettest.cpp
index ab39b95..850dc00 100644
--- a/autotests/gravatardownloadpixmapwidgettest.cpp
+++ b/autotests/gravatardownloadpixmapwidgettest.cpp
@@ -28,12 +28,10 @@
GravatarDownloadPixmapWidgetTest::GravatarDownloadPixmapWidgetTest(QObject *parent)
: QObject(parent)
{
-
}
GravatarDownloadPixmapWidgetTest::~GravatarDownloadPixmapWidgetTest()
{
-
}
void GravatarDownloadPixmapWidgetTest::shouldHaveDefaultValue()
diff --git a/autotests/gravatarresolvurljobtest.cpp b/autotests/gravatarresolvurljobtest.cpp
index e3465b3..546240b 100644
--- a/autotests/gravatarresolvurljobtest.cpp
+++ b/autotests/gravatarresolvurljobtest.cpp
@@ -24,12 +24,10 @@
GravatarResolvUrlJobTest::GravatarResolvUrlJobTest(QObject *parent)
: QObject(parent)
{
-
}
GravatarResolvUrlJobTest::~GravatarResolvUrlJobTest()
{
-
}
void GravatarResolvUrlJobTest::shouldHaveDefaultValue()
@@ -170,8 +168,10 @@ void GravatarResolvUrlJobTest::shouldGenerateGravatarUrl_data()
QTest::addColumn<bool>("uselibravatar");
QTest::newRow("empty") << QString() << QString() << QUrl() << false;
QTest::newRow("no domain") << QStringLiteral("foo") << QString() << QUrl() << false;
- QTest::newRow("validemail") << QStringLiteral("[email protected]") << QStringLiteral("89b4e14cf2fc6d426275c019c6dc9de6") << QUrl(QStringLiteral("http://www.gravatar.com:80/avatar/89b4e14cf2fc6d426275c019c6dc9de6?d=404")) << false;
- QTest::newRow("validemaillibravatar") << QStringLiteral("[email protected]") << QStringLiteral("2726400c3a33ce56c0ff632cbc0474f766d3b36e68819c601fb02954c1681d85") << QUrl(QStringLiteral("http://cdn.libravatar.org:80/avatar/2726400c3a33ce56c0ff632cbc0474f766d3b36e68819c601fb02954c1681d85?d=404")) << true;
+ QTest::newRow("validemail") << QStringLiteral("[email protected]") << QStringLiteral("89b4e14cf2fc6d426275c019c6dc9de6")
+ << QUrl(QStringLiteral("http://www.gravatar.com:80/avatar/89b4e14cf2fc6d426275c019c6dc9de6?d=404")) << false;
+ QTest::newRow("validemaillibravatar") << QStringLiteral("[email protected]") << QStringLiteral("2726400c3a33ce56c0ff632cbc0474f766d3b36e68819c601fb02954c1681d85")
+ << QUrl(QStringLiteral("http://cdn.libravatar.org:80/avatar/2726400c3a33ce56c0ff632cbc0474f766d3b36e68819c601fb02954c1681d85?d=404")) << true;
}
void GravatarResolvUrlJobTest::shouldGenerateGravatarUrl()
diff --git a/src/job/gravatarresolvurljob.cpp b/src/job/gravatarresolvurljob.cpp
index 24d1cd5..6dfceab 100644
--- a/src/job/gravatarresolvurljob.cpp
+++ b/src/job/gravatarresolvurljob.cpp
@@ -34,17 +34,16 @@ class Gravatar::GravatarResolvUrlJobPrivate
{
public:
GravatarResolvUrlJobPrivate()
- : mNetworkAccessManager(nullptr),
- mSize(80),
- mHasGravatar(false),
- mUseDefaultPixmap(false),
- mUseCache(false),
- mUseLibravatar(false),
- mFallbackGravatar(true),
- mFallbackDone(false),
- mUseHttps(false)
+ : mNetworkAccessManager(nullptr)
+ , mSize(80)
+ , mHasGravatar(false)
+ , mUseDefaultPixmap(false)
+ , mUseCache(false)
+ , mUseLibravatar(false)
+ , mFallbackGravatar(true)
+ , mFallbackDone(false)
+ , mUseHttps(false)
{
-
}
QPixmap mPixmap;
@@ -62,8 +61,8 @@ public:
};
GravatarResolvUrlJob::GravatarResolvUrlJob(QObject *parent)
- : QObject(parent),
- d(new Gravatar::GravatarResolvUrlJobPrivate)
+ : QObject(parent)
+ , d(new Gravatar::GravatarResolvUrlJobPrivate)
{
}
diff --git a/src/job/gravatarresolvurljob.h b/src/job/gravatarresolvurljob.h
index 1c15075..df95b02 100644
--- a/src/job/gravatarresolvurljob.h
+++ b/src/job/gravatarresolvurljob.h
@@ -25,8 +25,7 @@
#include <QUrl>
#include <QPixmap>
#include <QNetworkReply>
-namespace Gravatar
-{
+namespace Gravatar {
class GravatarResolvUrlJobPrivate;
class GRAVATAR_EXPORT GravatarResolvUrlJob : public QObject
{
diff --git a/src/misc/gravatarcache.cpp b/src/misc/gravatarcache.cpp
index 6a2a869..a9a7698 100644
--- a/src/misc/gravatarcache.cpp
+++ b/src/misc/gravatarcache.cpp
@@ -35,8 +35,8 @@ public:
GravatarCachePrivate()
: mMaximumSize(20)
{
-
}
+
QCache<QString, QPixmap> mCachePixmap;
QString mGravatarPath;
int mMaximumSize;
@@ -134,4 +134,3 @@ void GravatarCache::clearAllCache()
}
clear();
}
-
diff --git a/src/misc/gravatarcache.h b/src/misc/gravatarcache.h
index 81278c2..efb9f4d 100644
--- a/src/misc/gravatarcache.h
+++ b/src/misc/gravatarcache.h
@@ -24,8 +24,7 @@
#include <QPixmap>
-namespace Gravatar
-{
+namespace Gravatar {
class GravatarCachePrivate;
class GRAVATAR_EXPORT GravatarCache : public QObject
{
diff --git a/src/widgets/gravatarconfiguresettingsdialog.cpp b/src/widgets/gravatarconfiguresettingsdialog.cpp
index 6d56da2..5382a42 100644
--- a/src/widgets/gravatarconfiguresettingsdialog.cpp
+++ b/src/widgets/gravatarconfiguresettingsdialog.cpp
@@ -97,7 +97,6 @@ GravatarConfigureSettingsDialog::GravatarConfigureSettingsDialog(QWidget *parent
GravatarConfigureSettingsDialog::~GravatarConfigureSettingsDialog()
{
-
}
void GravatarConfigureSettingsDialog::slotRestoreDefault()
diff --git a/src/widgets/gravatarconfiguresettingsdialog.h b/src/widgets/gravatarconfiguresettingsdialog.h
index 421c955..d00c25a 100644
--- a/src/widgets/gravatarconfiguresettingsdialog.h
+++ b/src/widgets/gravatarconfiguresettingsdialog.h
@@ -25,8 +25,7 @@
class QCheckBox;
class QPushButton;
class KPluralHandlingSpinBox;
-namespace Gravatar
-{
+namespace Gravatar {
class GRAVATAR_EXPORT GravatarConfigureSettingsDialog : public QDialog
{
Q_OBJECT
diff --git a/src/widgets/gravatarconfigwidget.cpp b/src/widgets/gravatarconfigwidget.cpp
index d04fa53..fd418d3 100644
--- a/src/widgets/gravatarconfigwidget.cpp
+++ b/src/widgets/gravatarconfigwidget.cpp
@@ -35,10 +35,9 @@ class Gravatar::GravatarConfigWidgetPrivate
{
public:
GravatarConfigWidgetPrivate()
- : mEnableGravatarSupport(nullptr),
- mConfigureGravatarSetting(nullptr)
+ : mEnableGravatarSupport(nullptr)
+ , mConfigureGravatarSetting(nullptr)
{
-
}
QCheckBox *mEnableGravatarSupport;
@@ -46,8 +45,8 @@ public:
};
GravatarConfigWidget::GravatarConfigWidget(QWidget *parent)
- : QWidget(parent),
- d(new Gravatar::GravatarConfigWidgetPrivate)
+ : QWidget(parent)
+ , d(new Gravatar::GravatarConfigWidgetPrivate)
{
QHBoxLayout *mainLayout = new QHBoxLayout;
setLayout(mainLayout);
@@ -111,4 +110,3 @@ void GravatarConfigWidget::doResetToDefaultsOther()
doLoadFromGlobalSettings();
Gravatar::GravatarSettings::self()->useDefaults(bUseDefaults);
}
-
diff --git a/src/widgets/gravatarconfigwidget.h b/src/widgets/gravatarconfigwidget.h
index 05814a8..89f781f 100644
--- a/src/widgets/gravatarconfigwidget.h
+++ b/src/widgets/gravatarconfigwidget.h
@@ -22,8 +22,7 @@
#include <QWidget>
#include "gravatar_export.h"
-namespace Gravatar
-{
+namespace Gravatar {
class GravatarConfigWidgetPrivate;
class GRAVATAR_EXPORT GravatarConfigWidget : public QWidget
{
diff --git a/src/widgets/gravatardownloadpixmapdialog.cpp b/src/widgets/gravatardownloadpixmapdialog.cpp
index e9c267b..b8e4ea2 100644
--- a/src/widgets/gravatardownloadpixmapdialog.cpp
+++ b/src/widgets/gravatardownloadpixmapdialog.cpp
@@ -40,7 +40,6 @@ GravatarDownloadPixmapDialog::GravatarDownloadPixmapDialog(QWidget *parent)
GravatarDownloadPixmapDialog::~GravatarDownloadPixmapDialog()
{
-
}
void GravatarDownloadPixmapDialog::slotAccepted()
diff --git a/src/widgets/gravatardownloadpixmapdialog.h b/src/widgets/gravatardownloadpixmapdialog.h
index a9e5d24..6079ed9 100644
--- a/src/widgets/gravatardownloadpixmapdialog.h
+++ b/src/widgets/gravatardownloadpixmapdialog.h
@@ -23,8 +23,7 @@
#include <QDialog>
#include "gravatar_export.h"
-namespace Gravatar
-{
+namespace Gravatar {
class GravatarDownloadPixmapWidget;
class GRAVATAR_EXPORT GravatarDownloadPixmapDialog : public QDialog
{
diff --git a/src/widgets/gravatardownloadpixmapwidget.cpp b/src/widgets/gravatardownloadpixmapwidget.cpp
index 494adb0..f8a32cd 100644
--- a/src/widgets/gravatardownloadpixmapwidget.cpp
+++ b/src/widgets/gravatardownloadpixmapwidget.cpp
@@ -70,7 +70,6 @@ GravatarDownloadPixmapWidget::GravatarDownloadPixmapWidget(QWidget *parent)
GravatarDownloadPixmapWidget::~GravatarDownloadPixmapWidget()
{
-
}
QPixmap GravatarDownloadPixmapWidget::gravatarPixmap() const
diff --git a/src/widgets/gravatardownloadpixmapwidget.h b/src/widgets/gravatardownloadpixmapwidget.h
index bcbec14..da085db 100644
--- a/src/widgets/gravatardownloadpixmapwidget.h
+++ b/src/widgets/gravatardownloadpixmapwidget.h
@@ -26,8 +26,7 @@ class QLabel;
class QLineEdit;
class QPushButton;
class QCheckBox;
-namespace Gravatar
-{
+namespace Gravatar {
class GravatarResolvUrlJob;
class GRAVATAR_EXPORT GravatarDownloadPixmapWidget : public QWidget
{
diff --git a/tests/gravatarwidget_gui.cpp b/tests/gravatarwidget_gui.cpp
index c83fbff..c30463b 100644
--- a/tests/gravatarwidget_gui.cpp
+++ b/tests/gravatarwidget_gui.cpp
@@ -44,4 +44,3 @@ int main(int argc, char **argv)
delete w;
return ret;
}
-