Commit 32ece34d authored by Laurent Montel's avatar Laurent Montel 😁

Fix coding style

parent b343be0e
......@@ -25,12 +25,10 @@
GravatarCacheTest::GravatarCacheTest(QObject *parent)
: QObject(parent)
{
}
GravatarCacheTest::~GravatarCacheTest()
{
}
void GravatarCacheTest::shouldHaveDefaultValue()
......
......@@ -29,12 +29,10 @@
GravatarConfigureSettingsDialogTest::GravatarConfigureSettingsDialogTest(QObject *parent)
: QObject(parent)
{
}
GravatarConfigureSettingsDialogTest::~GravatarConfigureSettingsDialogTest()
{
}
void GravatarConfigureSettingsDialogTest::shouldHaveDefaultValue()
......
......@@ -32,12 +32,10 @@
GravatarConfigWidgetTest::GravatarConfigWidgetTest(QObject *parent)
: QObject(parent)
{
}
GravatarConfigWidgetTest::~GravatarConfigWidgetTest()
{
}
void GravatarConfigWidgetTest::shouldHaveDefaultValue()
......
......@@ -28,12 +28,10 @@
GravatarDownloadPixmapDialogTest::GravatarDownloadPixmapDialogTest(QObject *parent)
: QObject(parent)
{
}
GravatarDownloadPixmapDialogTest::~GravatarDownloadPixmapDialogTest()
{
}
void GravatarDownloadPixmapDialogTest::initTestCase()
......
......@@ -28,12 +28,10 @@
GravatarDownloadPixmapWidgetTest::GravatarDownloadPixmapWidgetTest(QObject *parent)
: QObject(parent)
{
}
GravatarDownloadPixmapWidgetTest::~GravatarDownloadPixmapWidgetTest()
{
}
void GravatarDownloadPixmapWidgetTest::shouldHaveDefaultValue()
......
......@@ -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("foo@kde.org") << QStringLiteral("89b4e14cf2fc6d426275c019c6dc9de6") << QUrl(QStringLiteral("http://www.gravatar.com:80/avatar/89b4e14cf2fc6d426275c019c6dc9de6?d=404")) << false;
QTest::newRow("validemaillibravatar") << QStringLiteral("foo@kde.org") << QStringLiteral("2726400c3a33ce56c0ff632cbc0474f766d3b36e68819c601fb02954c1681d85") << QUrl(QStringLiteral("http://cdn.libravatar.org:80/avatar/2726400c3a33ce56c0ff632cbc0474f766d3b36e68819c601fb02954c1681d85?d=404")) << true;
QTest::newRow("validemail") << QStringLiteral("foo@kde.org") << QStringLiteral("89b4e14cf2fc6d426275c019c6dc9de6")
<< QUrl(QStringLiteral("http://www.gravatar.com:80/avatar/89b4e14cf2fc6d426275c019c6dc9de6?d=404")) << false;
QTest::newRow("validemaillibravatar") << QStringLiteral("foo@kde.org") << QStringLiteral("2726400c3a33ce56c0ff632cbc0474f766d3b36e68819c601fb02954c1681d85")
<< QUrl(QStringLiteral("http://cdn.libravatar.org:80/avatar/2726400c3a33ce56c0ff632cbc0474f766d3b36e68819c601fb02954c1681d85?d=404")) << true;
}
void GravatarResolvUrlJobTest::shouldGenerateGravatarUrl()
......
......@@ -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)
{
}
......
......@@ -25,8 +25,7 @@
#include <QUrl>
#include <QPixmap>
#include <QNetworkReply>
namespace Gravatar
{
namespace Gravatar {
class GravatarResolvUrlJobPrivate;
class GRAVATAR_EXPORT GravatarResolvUrlJob : public QObject
{
......
......@@ -35,8 +35,8 @@ public:
GravatarCachePrivate()
: mMaximumSize(20)
{
}
QCache<QString, QPixmap> mCachePixmap;
QString mGravatarPath;
int mMaximumSize;
......@@ -134,4 +134,3 @@ void GravatarCache::clearAllCache()
}
clear();
}
......@@ -24,8 +24,7 @@
#include <QPixmap>
namespace Gravatar
{
namespace Gravatar {
class GravatarCachePrivate;
class GRAVATAR_EXPORT GravatarCache : public QObject
{
......
......@@ -97,7 +97,6 @@ GravatarConfigureSettingsDialog::GravatarConfigureSettingsDialog(QWidget *parent
GravatarConfigureSettingsDialog::~GravatarConfigureSettingsDialog()
{
}
void GravatarConfigureSettingsDialog::slotRestoreDefault()
......
......@@ -25,8 +25,7 @@
class QCheckBox;
class QPushButton;
class KPluralHandlingSpinBox;
namespace Gravatar
{
namespace Gravatar {
class GRAVATAR_EXPORT GravatarConfigureSettingsDialog : public QDialog
{
Q_OBJECT
......
......@@ -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);
}
......@@ -22,8 +22,7 @@
#include <QWidget>
#include "gravatar_export.h"
namespace Gravatar
{
namespace Gravatar {
class GravatarConfigWidgetPrivate;
class GRAVATAR_EXPORT GravatarConfigWidget : public QWidget
{
......
......@@ -40,7 +40,6 @@ GravatarDownloadPixmapDialog::GravatarDownloadPixmapDialog(QWidget *parent)
GravatarDownloadPixmapDialog::~GravatarDownloadPixmapDialog()
{
}
void GravatarDownloadPixmapDialog::slotAccepted()
......
......@@ -23,8 +23,7 @@
#include <QDialog>
#include "gravatar_export.h"
namespace Gravatar
{
namespace Gravatar {
class GravatarDownloadPixmapWidget;
class GRAVATAR_EXPORT GravatarDownloadPixmapDialog : public QDialog
{
......
......@@ -70,7 +70,6 @@ GravatarDownloadPixmapWidget::GravatarDownloadPixmapWidget(QWidget *parent)
GravatarDownloadPixmapWidget::~GravatarDownloadPixmapWidget()
{
}
QPixmap GravatarDownloadPixmapWidget::gravatarPixmap() const
......
......@@ -26,8 +26,7 @@ class QLabel;
class QLineEdit;
class QPushButton;
class QCheckBox;
namespace Gravatar
{
namespace Gravatar {
class GravatarResolvUrlJob;
class GRAVATAR_EXPORT GravatarDownloadPixmapWidget : public QWidget
{
......
......@@ -44,4 +44,3 @@ int main(int argc, char **argv)
delete w;
return ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment