summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-14 23:30:56 +0200
committerMontel Laurent <[email protected]>2017-04-14 23:30:56 +0200
commitde7f3d0621ddf77ef10e0bb0f3bea6a56a314778 (patch)
tree706e0892524dfe6634a56f63c4a6f04a663c4c00
parentf1d61fb460d4add1c56e98b89ed1892bda4f2413 (diff)
Fix coding style
-rw-r--r--contactprintthemeeditor/contactprintthemeconfiguredialog.cpp1
-rw-r--r--contactprintthemeeditor/contactprintthemeconfiguredialog.h9
-rw-r--r--contactprintthemeeditor/contactprintthemeeditorutil.cpp21
-rw-r--r--contactprintthemeeditor/contactprintthemepreview.cpp2
-rw-r--r--contactprintthemeeditor/contactprintthemepreview.h3
-rw-r--r--contactprintthemeeditor/defaultcompletion.h3
-rw-r--r--contactprintthemeeditor/editorpage.cpp11
-rw-r--r--contactprintthemeeditor/editorpage.h3
-rw-r--r--contactprintthemeeditor/themedefaulttemplate.cpp1
-rw-r--r--contactprintthemeeditor/themedefaulttemplate.h5
-rw-r--r--contactprintthemeeditor/themeeditormainwindow.cpp12
-rw-r--r--contactprintthemeeditor/themeeditorpage.cpp9
-rw-r--r--contactprintthemeeditor/themeeditorpage.h3
-rw-r--r--contactprintthemeeditor/themeeditorwidget.cpp1
-rw-r--r--contactprintthemeeditor/themetemplatewidget.cpp1
-rw-r--r--contactthemeeditor/contactconfigurationdialog.cpp1
-rw-r--r--contactthemeeditor/contactconfigurationdialog.h9
-rw-r--r--contactthemeeditor/contactdefaulttemplate.cpp1
-rw-r--r--contactthemeeditor/contactdefaulttemplate.h5
-rw-r--r--contactthemeeditor/contacteditormainwindow.cpp11
-rw-r--r--contactthemeeditor/contacteditorpage.cpp12
-rw-r--r--contactthemeeditor/contacteditorpage.h3
-rw-r--r--contactthemeeditor/contacteditorutil.cpp3
-rw-r--r--contactthemeeditor/contacteditorwidget.cpp1
-rw-r--r--contactthemeeditor/contactpreviewwidget.cpp1
-rw-r--r--contactthemeeditor/contactpreviewwidget.h6
-rw-r--r--contactthemeeditor/contacttemplatewidget.cpp1
-rw-r--r--contactthemeeditor/defaultcompletion.cpp4
-rw-r--r--contactthemeeditor/defaultcompletion.h3
-rw-r--r--contactthemeeditor/editorpage.cpp9
-rw-r--r--contactthemeeditor/editorpage.h3
-rw-r--r--contactthemeeditor/previewwidget.cpp1
-rw-r--r--grantleethemeeditor/configurewidget.cpp5
-rw-r--r--grantleethemeeditor/configurewidget.h6
-rw-r--r--grantleethemeeditor/desktopfilepage.cpp14
-rw-r--r--grantleethemeeditor/desktopfilepage.h6
-rw-r--r--grantleethemeeditor/editorpage.cpp12
-rw-r--r--grantleethemeeditor/editorpage.h3
-rw-r--r--grantleethemeeditor/editorwidget.cpp1
-rw-r--r--grantleethemeeditor/editorwidget.h3
-rw-r--r--grantleethemeeditor/grantleeplaintexteditor.cpp2
-rw-r--r--grantleethemeeditor/grantleeplaintexteditor.h6
-rw-r--r--grantleethemeeditor/managethemes.cpp10
-rw-r--r--grantleethemeeditor/managethemes.h3
-rw-r--r--grantleethemeeditor/newthemedialog.cpp13
-rw-r--r--grantleethemeeditor/newthemedialog.h3
-rw-r--r--grantleethemeeditor/previewwidget.cpp9
-rw-r--r--grantleethemeeditor/previewwidget.h3
-rw-r--r--grantleethemeeditor/themeeditortabwidget.cpp1
-rw-r--r--grantleethemeeditor/themeeditortabwidget.h3
-rw-r--r--grantleethemeeditor/themesession.cpp6
-rw-r--r--grantleethemeeditor/themesession.h3
-rw-r--r--headerthemeeditor/defaultcompletion.h3
-rw-r--r--headerthemeeditor/editorpage.cpp9
-rw-r--r--headerthemeeditor/editorpage.h3
-rw-r--r--headerthemeeditor/previewwidget.cpp1
-rw-r--r--headerthemeeditor/previewwidget.h3
-rw-r--r--headerthemeeditor/themeconfiguredialog.cpp1
-rw-r--r--headerthemeeditor/themeconfiguredialog.h6
-rw-r--r--headerthemeeditor/themedefaulttemplate.cpp1
-rw-r--r--headerthemeeditor/themedefaulttemplate.h5
-rw-r--r--headerthemeeditor/themeeditormainwindow.cpp16
-rw-r--r--headerthemeeditor/themeeditorpage.cpp9
-rw-r--r--headerthemeeditor/themeeditorpage.h3
-rw-r--r--headerthemeeditor/themeeditorwidget.cpp1
-rw-r--r--headerthemeeditor/themetemplatewidget.cpp1
66 files changed, 126 insertions, 207 deletions
diff --git a/contactprintthemeeditor/contactprintthemeconfiguredialog.cpp b/contactprintthemeeditor/contactprintthemeconfiguredialog.cpp
index 4885591..146ad99 100644
--- a/contactprintthemeeditor/contactprintthemeconfiguredialog.cpp
+++ b/contactprintthemeeditor/contactprintthemeconfiguredialog.cpp
@@ -157,4 +157,3 @@ void ContactPrintThemeConfigureDialog::writeConfig()
group.writeEntry("defaultTemplate", mDefaultTemplate->toPlainText());
mConfigureWidget->writeConfig();
}
-
diff --git a/contactprintthemeeditor/contactprintthemeconfiguredialog.h b/contactprintthemeeditor/contactprintthemeconfiguredialog.h
index bc9a564..8534766 100644
--- a/contactprintthemeeditor/contactprintthemeconfiguredialog.h
+++ b/contactprintthemeeditor/contactprintthemeconfiguredialog.h
@@ -22,18 +22,15 @@
#include <QDialog>
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class ConfigureWidget;
}
-namespace Akonadi
-{
+namespace Akonadi {
class ContactEditor;
}
-namespace KPIMTextEdit
-{
+namespace KPIMTextEdit {
class PlainTextEditorWidget;
}
class ContactPrintThemeConfigureDialog : public QDialog
diff --git a/contactprintthemeeditor/contactprintthemeeditorutil.cpp b/contactprintthemeeditor/contactprintthemeeditorutil.cpp
index 3cabe42..297b676 100644
--- a/contactprintthemeeditor/contactprintthemeeditorutil.cpp
+++ b/contactprintthemeeditor/contactprintthemeeditorutil.cpp
@@ -21,7 +21,6 @@
ContactPrintThemeEditorutil::ContactPrintThemeEditorutil()
{
-
}
QString ContactPrintThemeEditorutil::defaultContact() const
@@ -43,16 +42,16 @@ QString ContactPrintThemeEditorutil::defaultContact() const
QString ContactPrintThemeEditorutil::defaultTemplate() const
{
const QString templateStr = QStringLiteral("<html>\n"
- "{% if contacts %}\n"
- "{% for contact in contacts %}\n"
- "<h1>{{ contact.realName|safe }}</h1>\n"
- "<p>{{ contact.emails|safe }}</p>\n"
- "<p>{{ contact.note|safe }}</p>\n"
- "<br>\n"
- "<br>\n"
- "{% endfor %}\n"
- "{% endif %}\n"
- "</html>");
+ "{% if contacts %}\n"
+ "{% for contact in contacts %}\n"
+ "<h1>{{ contact.realName|safe }}</h1>\n"
+ "<p>{{ contact.emails|safe }}</p>\n"
+ "<p>{{ contact.note|safe }}</p>\n"
+ "<br>\n"
+ "<br>\n"
+ "{% endfor %}\n"
+ "{% endif %}\n"
+ "</html>");
return templateStr;
}
diff --git a/contactprintthemeeditor/contactprintthemepreview.cpp b/contactprintthemeeditor/contactprintthemepreview.cpp
index 105b1d9..817a541 100644
--- a/contactprintthemeeditor/contactprintthemepreview.cpp
+++ b/contactprintthemeeditor/contactprintthemepreview.cpp
@@ -44,7 +44,6 @@ ContactPrintThemePreview::ContactPrintThemePreview(const QString &projectDirecto
ContactPrintThemePreview::~ContactPrintThemePreview()
{
-
}
void ContactPrintThemePreview::updateViewer()
@@ -91,4 +90,3 @@ void ContactPrintThemePreview::loadConfig()
}
}
}
-
diff --git a/contactprintthemeeditor/contactprintthemepreview.h b/contactprintthemeeditor/contactprintthemepreview.h
index 1b466b3..49100ca 100644
--- a/contactprintthemeeditor/contactprintthemepreview.h
+++ b/contactprintthemeeditor/contactprintthemepreview.h
@@ -24,8 +24,7 @@
#include <KContacts/Addressee>
#include "grantleethemeeditor/previewwidget.h"
-namespace KAddressBookGrantlee
-{
+namespace KAddressBookGrantlee {
class GrantleePrint;
}
class QWebEngineView;
diff --git a/contactprintthemeeditor/defaultcompletion.h b/contactprintthemeeditor/defaultcompletion.h
index e881651..d80894d 100644
--- a/contactprintthemeeditor/defaultcompletion.h
+++ b/contactprintthemeeditor/defaultcompletion.h
@@ -22,8 +22,7 @@
#include <QStringList>
-namespace DefaultCompletion
-{
+namespace DefaultCompletion {
QStringList defaultCompetion();
QStringList defaultOptions();
}
diff --git a/contactprintthemeeditor/editorpage.cpp b/contactprintthemeeditor/editorpage.cpp
index c641fb5..fec586b 100644
--- a/contactprintthemeeditor/editorpage.cpp
+++ b/contactprintthemeeditor/editorpage.cpp
@@ -36,9 +36,9 @@
#include <KSharedConfig>
EditorPage::EditorPage(GrantleeThemeEditor::EditorPage::PageType type, const QString &projectDirectory, QWidget *parent)
- : GrantleeThemeEditor::EditorPage(type, parent),
- mPreview(nullptr),
- mWidgetSplitter(nullptr)
+ : GrantleeThemeEditor::EditorPage(type, parent)
+ , mPreview(nullptr)
+ , mWidgetSplitter(nullptr)
{
QVBoxLayout *lay = new QVBoxLayout(this);
lay->setMargin(0);
@@ -77,7 +77,9 @@ EditorPage::EditorPage(GrantleeThemeEditor::EditorPage::PageType type, const QSt
if (mType == MainPage) {
KConfigGroup group(KSharedConfig::openConfig(), "EditorPage");
- const QList<int> size{400, 100};
+ const QList<int> size {
+ 400, 100
+ };
mMainSplitter->setSizes(group.readEntry("mainSplitter", size));
mWidgetSplitter->setSizes(group.readEntry("widgetSplitter", size));
}
@@ -96,4 +98,3 @@ ContactPrintThemePreview *EditorPage::preview() const
{
return mPreview;
}
-
diff --git a/contactprintthemeeditor/editorpage.h b/contactprintthemeeditor/editorpage.h
index 28c798e..62dbe1b 100644
--- a/contactprintthemeeditor/editorpage.h
+++ b/contactprintthemeeditor/editorpage.h
@@ -26,8 +26,7 @@ class ThemeTemplateWidget;
class EditorWidget;
class QSplitter;
class ContactPrintThemePreview;
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class EditorWidget;
}
diff --git a/contactprintthemeeditor/themedefaulttemplate.cpp b/contactprintthemeeditor/themedefaulttemplate.cpp
index 7230717..226791e 100644
--- a/contactprintthemeeditor/themedefaulttemplate.cpp
+++ b/contactprintthemeeditor/themedefaulttemplate.cpp
@@ -29,4 +29,3 @@ QVector<PimCommon::defaultTemplate> ThemeDefaultTemplate::defaultTemplates()
return lst;
}
-
diff --git a/contactprintthemeeditor/themedefaulttemplate.h b/contactprintthemeeditor/themedefaulttemplate.h
index 9aa50d0..cf7b6a2 100644
--- a/contactprintthemeeditor/themedefaulttemplate.h
+++ b/contactprintthemeeditor/themedefaulttemplate.h
@@ -22,11 +22,8 @@
#include <PimCommon/TemplateListWidget>
-namespace ThemeDefaultTemplate
-{
-
+namespace ThemeDefaultTemplate {
QVector<PimCommon::defaultTemplate> defaultTemplates();
-
}
#endif // THEMEDEFAULTTEMPLATE_H
diff --git a/contactprintthemeeditor/themeeditormainwindow.cpp b/contactprintthemeeditor/themeeditormainwindow.cpp
index d0d2f2f..c76077d 100644
--- a/contactprintthemeeditor/themeeditormainwindow.cpp
+++ b/contactprintthemeeditor/themeeditormainwindow.cpp
@@ -42,8 +42,8 @@
#include <QStandardPaths>
ThemeEditorMainWindow::ThemeEditorMainWindow()
- : KXmlGuiWindow(),
- mThemeEditor(nullptr)
+ : KXmlGuiWindow()
+ , mThemeEditor(nullptr)
{
setupActions();
setupGUI();
@@ -133,7 +133,6 @@ void ThemeEditorMainWindow::setupActions()
actionCollection()->setDefaultShortcut(mUpdateView, QKeySequence(Qt::Key_F5));
connect(mUpdateView, &QAction::triggered, this, &ThemeEditorMainWindow::slotUpdateView);
actionCollection()->addAction(QStringLiteral("update_view"), mUpdateView);
-
}
void ThemeEditorMainWindow::slotManageTheme()
@@ -254,11 +253,11 @@ bool ThemeEditorMainWindow::saveCurrentProject(ActionSaveTheme act)
switch (act) {
case SaveOnly:
break;
- case SaveAndCloseTheme: {
+ case SaveAndCloseTheme:
closeThemeEditor();
break;
- }
- case SaveAndCreateNewTheme: {
+ case SaveAndCreateNewTheme:
+ {
delete mThemeEditor;
mThemeEditor = nullptr;
QPointer<GrantleeThemeEditor::NewThemeDialog> dialog = new GrantleeThemeEditor::NewThemeDialog(this);
@@ -340,4 +339,3 @@ void ThemeEditorMainWindow::slotSaveAsTheme()
}
}
}
-
diff --git a/contactprintthemeeditor/themeeditorpage.cpp b/contactprintthemeeditor/themeeditorpage.cpp
index 71ba7e5..0535897 100644
--- a/contactprintthemeeditor/themeeditorpage.cpp
+++ b/contactprintthemeeditor/themeeditorpage.cpp
@@ -41,9 +41,9 @@
#include <QFileDialog>
ThemeEditorPage::ThemeEditorPage(const QString &projectDir, const QString &themeName, QWidget *parent)
- : QWidget(parent),
- mThemeSession(new GrantleeThemeEditor::ThemeSession(projectDir, QStringLiteral("headerthemeeditor"))),
- mChanged(false)
+ : QWidget(parent)
+ , mThemeSession(new GrantleeThemeEditor::ThemeSession(projectDir, QStringLiteral("headerthemeeditor")))
+ , mChanged(false)
{
QHBoxLayout *lay = new QHBoxLayout;
mTabWidget = new GrantleeThemeEditor::ThemeEditorTabWidget;
@@ -174,7 +174,7 @@ void ThemeEditorPage::uploadTheme()
lst << previewFileName;
mEditorPage->preview()->createScreenShot(lst);
- const bool fileAdded = zip->addLocalFile(previewFileName, themename + QLatin1Char('/') + QLatin1String("theme_preview.png"));
+ const bool fileAdded = zip->addLocalFile(previewFileName, themename + QLatin1Char('/') + QLatin1String("theme_preview.png"));
if (!fileAdded) {
KMessageBox::error(this, i18n("We cannot add preview file in zip file"), i18n("Failed to add file."));
delete zip;
@@ -298,4 +298,3 @@ void ThemeEditorPage::saveThemeAs(const QString &directory)
{
storeTheme(directory);
}
-
diff --git a/contactprintthemeeditor/themeeditorpage.h b/contactprintthemeeditor/themeeditorpage.h
index 68c24e2..441e47b 100644
--- a/contactprintthemeeditor/themeeditorpage.h
+++ b/contactprintthemeeditor/themeeditorpage.h
@@ -22,8 +22,7 @@
#include <QWidget>
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class ThemeEditorTabWidget;
class ThemeSession;
class DesktopFilePage;
diff --git a/contactprintthemeeditor/themeeditorwidget.cpp b/contactprintthemeeditor/themeeditorwidget.cpp
index 1f3cfca..4690c90 100644
--- a/contactprintthemeeditor/themeeditorwidget.cpp
+++ b/contactprintthemeeditor/themeeditorwidget.cpp
@@ -38,4 +38,3 @@ void ThemeEditorWidget::createCompleterList(const QStringList &extraCompletion)
listWord << extraCompletion;
GrantleeThemeEditor::EditorWidget::createCompleterList(listWord);
}
-
diff --git a/contactprintthemeeditor/themetemplatewidget.cpp b/contactprintthemeeditor/themetemplatewidget.cpp
index bdb1dea..9bf73bc 100644
--- a/contactprintthemeeditor/themetemplatewidget.cpp
+++ b/contactprintthemeeditor/themetemplatewidget.cpp
@@ -55,4 +55,3 @@ ThemeTemplateWidget::ThemeTemplateWidget(const QString &title, QWidget *parent)
ThemeTemplateWidget::~ThemeTemplateWidget()
{
}
-
diff --git a/contactthemeeditor/contactconfigurationdialog.cpp b/contactthemeeditor/contactconfigurationdialog.cpp
index 8b22748..19e98ec 100644
--- a/contactthemeeditor/contactconfigurationdialog.cpp
+++ b/contactthemeeditor/contactconfigurationdialog.cpp
@@ -155,4 +155,3 @@ void ContactConfigureDialog::writeConfig()
group.writeEntry("defaultTemplate", mDefaultTemplate->toPlainText());
mConfigureWidget->writeConfig();
}
-
diff --git a/contactthemeeditor/contactconfigurationdialog.h b/contactthemeeditor/contactconfigurationdialog.h
index 5f02d7f..d84e833 100644
--- a/contactthemeeditor/contactconfigurationdialog.h
+++ b/contactthemeeditor/contactconfigurationdialog.h
@@ -21,18 +21,15 @@
#include <QDialog>
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class ConfigureWidget;
}
-namespace Akonadi
-{
+namespace Akonadi {
class ContactEditor;
}
-namespace KPIMTextEdit
-{
+namespace KPIMTextEdit {
class PlainTextEditorWidget;
}
class ContactConfigureDialog : public QDialog
diff --git a/contactthemeeditor/contactdefaulttemplate.cpp b/contactthemeeditor/contactdefaulttemplate.cpp
index acf0cbe..f3e0fd5 100644
--- a/contactthemeeditor/contactdefaulttemplate.cpp
+++ b/contactthemeeditor/contactdefaulttemplate.cpp
@@ -27,4 +27,3 @@ QVector<PimCommon::defaultTemplate> ContactDefaultTemplate::contactTemplates()
lst << tmp;
*/
}
-
diff --git a/contactthemeeditor/contactdefaulttemplate.h b/contactthemeeditor/contactdefaulttemplate.h
index 47c87bd..e346f12 100644
--- a/contactthemeeditor/contactdefaulttemplate.h
+++ b/contactthemeeditor/contactdefaulttemplate.h
@@ -21,11 +21,8 @@
#include <PimCommon/TemplateListWidget>
-namespace ContactDefaultTemplate
-{
-
+namespace ContactDefaultTemplate {
QVector<PimCommon::defaultTemplate> contactTemplates();
-
}
#endif // CONTACTDEFAULTTEMPLATE_H
diff --git a/contactthemeeditor/contacteditormainwindow.cpp b/contactthemeeditor/contacteditormainwindow.cpp
index 9b46c14..f681182 100644
--- a/contactthemeeditor/contacteditormainwindow.cpp
+++ b/contactthemeeditor/contacteditormainwindow.cpp
@@ -40,8 +40,8 @@
#include <QStandardPaths>
ContactEditorMainWindow::ContactEditorMainWindow()
- : KXmlGuiWindow(),
- mContactEditor(nullptr)
+ : KXmlGuiWindow()
+ , mContactEditor(nullptr)
{
setupActions();
setupGUI();
@@ -249,11 +249,11 @@ bool ContactEditorMainWindow::saveCurrentProject(ActionSaveTheme act)
switch (act) {
case SaveOnly:
break;
- case SaveAndCloseTheme: {
+ case SaveAndCloseTheme:
closeThemeEditor();
break;
- }
- case SaveAndCreateNewTheme: {
+ case SaveAndCreateNewTheme:
+ {
delete mContactEditor;
mContactEditor = nullptr;
QPointer<GrantleeThemeEditor::NewThemeDialog> dialog = new GrantleeThemeEditor::NewThemeDialog(this);
@@ -334,4 +334,3 @@ void ContactEditorMainWindow::slotSaveAsTheme()
}
}
}
-
diff --git a/contactthemeeditor/contacteditorpage.cpp b/contactthemeeditor/contacteditorpage.cpp
index 630bc3a..6266fac 100644
--- a/contactthemeeditor/contacteditorpage.cpp
+++ b/contactthemeeditor/contacteditorpage.cpp
@@ -42,9 +42,9 @@
#include <QFileDialog>
ContactEditorPage::ContactEditorPage(const QString &projectDir, const QString &themeName, QWidget *parent)
- : QWidget(parent),
- mThemeSession(new GrantleeThemeEditor::ThemeSession(projectDir, QStringLiteral("contactthemeeditor"))),
- mChanged(false)
+ : QWidget(parent)
+ , mThemeSession(new GrantleeThemeEditor::ThemeSession(projectDir, QStringLiteral("contactthemeeditor")))
+ , mChanged(false)
{
QHBoxLayout *lay = new QHBoxLayout;
mTabWidget = new GrantleeThemeEditor::ThemeEditorTabWidget;
@@ -168,7 +168,6 @@ void ContactEditorPage::uploadTheme()
const QString zipFileName = tmp.path() + QDir::separator() + themename + QLatin1String(".zip");
KZip *zip = new KZip(zipFileName);
if (zip->open(QIODevice::WriteOnly)) {
-
//TODO reactivate it when we will be able to create a preview
const QString previewContactFileName = tmp.path() + QDir::separator() + themename + QLatin1String("contact_preview.png");
const QString previewContactGroupFileName = tmp.path() + QDir::separator() + themename + QLatin1String("contactgroup_preview.png");
@@ -177,13 +176,13 @@ void ContactEditorPage::uploadTheme()
mEditorPage->preview()->createScreenShot(lst);
- bool fileAdded = zip->addLocalFile(previewContactFileName, themename + QLatin1Char('/') + QLatin1String("contact_preview.png"));
+ bool fileAdded = zip->addLocalFile(previewContactFileName, themename + QLatin1Char('/') + QLatin1String("contact_preview.png"));
if (!fileAdded) {
KMessageBox::error(this, i18n("We cannot add preview file in zip file"), i18n("Failed to add file."));
delete zip;
return;
}
- fileAdded = zip->addLocalFile(previewContactGroupFileName, themename + QLatin1Char('/') + QLatin1String("contactgroup_preview.png"));
+ fileAdded = zip->addLocalFile(previewContactGroupFileName, themename + QLatin1Char('/') + QLatin1String("contactgroup_preview.png"));
if (!fileAdded) {
KMessageBox::error(this, i18n("We cannot add preview file in zip file"), i18n("Failed to add file."));
delete zip;
@@ -337,4 +336,3 @@ void ContactEditorPage::saveThemeAs(const QString &directory)
{
storeTheme(directory);
}
-
diff --git a/contactthemeeditor/contacteditorpage.h b/contactthemeeditor/contacteditorpage.h
index b5d977a..3332de0 100644
--- a/contactthemeeditor/contacteditorpage.h
+++ b/contactthemeeditor/contacteditorpage.h
@@ -21,8 +21,7 @@
#include <QWidget>
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class ThemeEditorTabWidget;
class ThemeSession;
class DesktopFilePage;
diff --git a/contactthemeeditor/contacteditorutil.cpp b/contactthemeeditor/contacteditorutil.cpp
index 1adeec4..8749e7b 100644
--- a/contactthemeeditor/contacteditorutil.cpp
+++ b/contactthemeeditor/contacteditorutil.cpp
@@ -20,12 +20,10 @@
ContactEditorUtil::ContactEditorUtil()
{
-
}
QString ContactEditorUtil::defaultContact() const
{
-
const QString contact = QStringLiteral("BEGIN:VCARD\n"
"ADR;TYPE=home:;;10 street Eiffel Tower\n;Paris;;75016;France\n"
@@ -39,4 +37,3 @@ QString ContactEditorUtil::defaultContact() const
"END:VCARD");
return contact;
}
-
diff --git a/contactthemeeditor/contacteditorwidget.cpp b/contactthemeeditor/contacteditorwidget.cpp
index e4e517d..3e10a21 100644
--- a/contactthemeeditor/contacteditorwidget.cpp
+++ b/contactthemeeditor/contacteditorwidget.cpp
@@ -34,4 +34,3 @@ void ContactEditorWidget::createCompleterList(const QStringList &extraCompletion
const QStringList listWord = QStringList() << DefaultCompletion::defaultCompetion() << DefaultCompletion::defaultOptions() << extraCompletion;
GrantleeThemeEditor::EditorWidget::createCompleterList(listWord);
}
-
diff --git a/contactthemeeditor/contactpreviewwidget.cpp b/contactthemeeditor/contactpreviewwidget.cpp
index 3e5b2d5..d589ccb 100644
--- a/contactthemeeditor/contactpreviewwidget.cpp
+++ b/contactthemeeditor/contactpreviewwidget.cpp
@@ -138,4 +138,3 @@ void ContactPreviewWidget::setThemePath(const QString &projectDirectory)
mGroupFormatter->setAbsoluteThemePath(projectDirectory);
mFormatter->setAbsoluteThemePath(projectDirectory);
}
-
diff --git a/contactthemeeditor/contactpreviewwidget.h b/contactthemeeditor/contactpreviewwidget.h
index 221de6f..cdcbd7b 100644
--- a/contactthemeeditor/contactpreviewwidget.h
+++ b/contactthemeeditor/contactpreviewwidget.h
@@ -25,14 +25,12 @@
class QTabWidget;
-namespace Akonadi
-{
+namespace Akonadi {
class ContactViewer;
class ContactGroupViewer;
}
-namespace KAddressBookGrantlee
-{
+namespace KAddressBookGrantlee {
class GrantleeContactFormatter;
class GrantleeContactGroupFormatter;
}
diff --git a/contactthemeeditor/contacttemplatewidget.cpp b/contactthemeeditor/contacttemplatewidget.cpp
index b76e610..6944f5b 100644
--- a/contactthemeeditor/contacttemplatewidget.cpp
+++ b/contactthemeeditor/contacttemplatewidget.cpp
@@ -54,4 +54,3 @@ ContactTemplateWidget::ContactTemplateWidget(const QString &title, QWidget *pare
ContactTemplateWidget::~ContactTemplateWidget()
{
}
-
diff --git a/contactthemeeditor/defaultcompletion.cpp b/contactthemeeditor/defaultcompletion.cpp
index ccb2d23..ea7f92f 100644
--- a/contactthemeeditor/defaultcompletion.cpp
+++ b/contactthemeeditor/defaultcompletion.cpp
@@ -75,6 +75,8 @@ QStringList DefaultCompletion::defaultCompetion()
QStringList DefaultCompletion::defaultOptions()
{
- const QStringList lst{QStringLiteral("Safe")};
+ const QStringList lst {
+ QStringLiteral("Safe")
+ };
return lst;
}
diff --git a/contactthemeeditor/defaultcompletion.h b/contactthemeeditor/defaultcompletion.h
index f5d8875..819a743 100644
--- a/contactthemeeditor/defaultcompletion.h
+++ b/contactthemeeditor/defaultcompletion.h
@@ -21,8 +21,7 @@
#include <QStringList>
-namespace DefaultCompletion
-{
+namespace DefaultCompletion {
QStringList defaultCompetion();
QStringList defaultOptions();
}
diff --git a/contactthemeeditor/editorpage.cpp b/contactthemeeditor/editorpage.cpp
index 245131a..44ac846 100644
--- a/contactthemeeditor/editorpage.cpp
+++ b/contactthemeeditor/editorpage.cpp
@@ -34,8 +34,8 @@
#include <QVBoxLayout>
EditorPage::EditorPage(GrantleeThemeEditor::EditorPage::PageType type, const QString &projectDirectory, QWidget *parent)
- : GrantleeThemeEditor::EditorPage(type, parent),
- mWidgetSplitter(nullptr)
+ : GrantleeThemeEditor::EditorPage(type, parent)
+ , mWidgetSplitter(nullptr)
{
QVBoxLayout *lay = new QVBoxLayout(this);
lay->setMargin(0);
@@ -73,7 +73,9 @@ EditorPage::EditorPage(GrantleeThemeEditor::EditorPage::PageType type, const QSt
if (mType == MainPage) {
KConfigGroup group(KSharedConfig::openConfig(), "EditorPage");
- const QList<int> size{400, 100};
+ const QList<int> size {
+ 400, 100
+ };
mMainSplitter->setSizes(group.readEntry("mainSplitter", size));
mWidgetSplitter->setSizes(group.readEntry("widgetSplitter", size));
}
@@ -92,4 +94,3 @@ GrantleeThemeEditor::PreviewWidget *EditorPage::preview() const
{
return mPreview;
}
-
diff --git a/contactthemeeditor/editorpage.h b/contactthemeeditor/editorpage.h
index 66e628b..2455e92 100644
--- a/contactthemeeditor/editorpage.h
+++ b/contactthemeeditor/editorpage.h
@@ -24,8 +24,7 @@
class ContactTemplateWidget;
class EditorWidget;
class QSplitter;
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class EditorWidget;
class PreviewWidget;
}
diff --git a/contactthemeeditor/previewwidget.cpp b/contactthemeeditor/previewwidget.cpp
index 2753598..c7a2c2e 100644
--- a/contactthemeeditor/previewwidget.cpp
+++ b/contactthemeeditor/previewwidget.cpp
@@ -56,4 +56,3 @@ void PreviewWidget::setThemePath(const QString &projectDirectory, const QString
mPreview->setThemePath(projectDirectory);
updateViewer();
}
-
diff --git a/grantleethemeeditor/configurewidget.cpp b/grantleethemeeditor/configurewidget.cpp
index a6a6a0b..1d26751 100644
--- a/grantleethemeeditor/configurewidget.cpp
+++ b/grantleethemeeditor/configurewidget.cpp
@@ -26,8 +26,8 @@
using namespace GrantleeThemeEditor;
ConfigureWidget::ConfigureWidget(QWidget *parent)
- : QWidget(parent),
- ui(new Ui::ConfigureWidget)
+ : QWidget(parent)
+ , ui(new Ui::ConfigureWidget)
{
ui->setupUi(this);
}
@@ -67,4 +67,3 @@ void ConfigureWidget::setDefault()
ui->authorEmail->clear();
ui->author->clear();
}
-
diff --git a/grantleethemeeditor/configurewidget.h b/grantleethemeeditor/configurewidget.h
index 2894e42..2a44d28 100644
--- a/grantleethemeeditor/configurewidget.h
+++ b/grantleethemeeditor/configurewidget.h
@@ -23,13 +23,11 @@
#include "grantleethemeeditor_export.h"
#include <QWidget>
-namespace Ui
-{
+namespace Ui {
class ConfigureWidget;
}
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class GRANTLEETHEMEEDITOR_EXPORT ConfigureWidget : public QWidget
{
Q_OBJECT
diff --git a/grantleethemeeditor/desktopfilepage.cpp b/grantleethemeeditor/desktopfilepage.cpp
index 7bec66b..9e1b742 100644
--- a/grantleethemeeditor/desktopfilepage.cpp
+++ b/grantleethemeeditor/desktopfilepage.cpp
@@ -37,9 +37,9 @@
using namespace GrantleeThemeEditor;
DesktopFilePage::DesktopFilePage(const QString &defaultFileName, DesktopFilePage::DesktopFileOptions options, QWidget *parent)
- : QWidget(parent),
- mFilename(nullptr),
- mExtraDisplayHeaders(nullptr)
+ : QWidget(parent)
+ , mFilename(nullptr)
+ , mExtraDisplayHeaders(nullptr)
{
QGridLayout *lay = new QGridLayout;
QLabel *lab = new QLabel(i18n("Name:"), this);
@@ -94,7 +94,10 @@ DesktopFilePage::DesktopFilePage(const QString &defaultFileName, DesktopFilePage
lay->addWidget(lab, row, 0);
++row;
- lab = new QLabel(QStringLiteral("<qt><b>") + i18n("Be careful, Grantlee does not support '-' in variable name. So when you want to add extra header as \"X-Original-To\" add \"X-Original-To\" in list, but use \"XOriginalTo\" as variable in Grantlee (remove '-' in name).") + QStringLiteral("</b></qt>"), this);
+ lab
+ = new QLabel(QStringLiteral("<qt><b>") + i18n(
+ "Be careful, Grantlee does not support '-' in variable name. So when you want to add extra header as \"X-Original-To\" add \"X-Original-To\" in list, but use \"XOriginalTo\" as variable in Grantlee (remove '-' in name).")
+ + QStringLiteral("</b></qt>"), this);
lab->setWordWrap(true);
lay->addWidget(lab, row, 0, 1, 2);
@@ -137,7 +140,7 @@ void DesktopFilePage::createZip(const QString &themeName, KZip *zip)
QTemporaryFile tmp;
tmp.open();
saveAsFilename(tmp.fileName());
- const bool fileAdded = zip->addLocalFile(tmp.fileName(), themeName + QLatin1Char('/') + mDefaultDesktopName);
+ const bool fileAdded = zip->addLocalFile(tmp.fileName(), themeName + QLatin1Char('/') + mDefaultDesktopName);
if (!fileAdded) {
KMessageBox::error(this, i18n("Failed to add file into ZIP archive."),
i18nc("@title:window", "Failed to add file"));
@@ -222,4 +225,3 @@ QString DesktopFilePage::description() const
{
return mDescription->toPlainText();
}
-
diff --git a/grantleethemeeditor/desktopfilepage.h b/grantleethemeeditor/desktopfilepage.h
index e9cd482..a7714ed 100644
--- a/grantleethemeeditor/desktopfilepage.h
+++ b/grantleethemeeditor/desktopfilepage.h
@@ -24,12 +24,10 @@
class QLineEdit;
class KZip;
class KEditListWidget;
-namespace KPIMTextEdit
-{
+namespace KPIMTextEdit {
class PlainTextEditorWidget;
}
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class GRANTLEETHEMEEDITOR_EXPORT DesktopFilePage : public QWidget
{
Q_OBJECT
diff --git a/grantleethemeeditor/editorpage.cpp b/grantleethemeeditor/editorpage.cpp
index 8ea28d8..69b8ffa 100644
--- a/grantleethemeeditor/editorpage.cpp
+++ b/grantleethemeeditor/editorpage.cpp
@@ -31,16 +31,15 @@
using namespace GrantleeThemeEditor;
EditorPage::EditorPage(PageType type, QWidget *parent)
- : QWidget(parent),
- mType(type),
- mPreview(nullptr),
- mEditor(nullptr)
+ : QWidget(parent)
+ , mType(type)
+ , mPreview(nullptr)
+ , mEditor(nullptr)
{
}
EditorPage::~EditorPage()
{
-
}
EditorPage::PageType EditorPage::pageType() const
@@ -114,7 +113,7 @@ void EditorPage::createZip(const QString &themeName, KZip *zip)
QTemporaryFile tmp;
tmp.open();
saveAsFilename(tmp.fileName());
- const bool fileAdded = zip->addLocalFile(tmp.fileName(), themeName + QLatin1Char('/') + mPageFileName);
+ const bool fileAdded = zip->addLocalFile(tmp.fileName(), themeName + QLatin1Char('/') + mPageFileName);
if (!fileAdded) {
KMessageBox::error(this, i18n("Failed to add file into ZIP archive."),
i18nc("@title:window", "Failed to add file"));
@@ -126,4 +125,3 @@ void EditorPage::installTheme(const QString &themePath)
const QString filename = themePath + QDir::separator() + mPageFileName;
saveAsFilename(filename);
}
-
diff --git a/grantleethemeeditor/editorpage.h b/grantleethemeeditor/editorpage.h
index 7c825da..4e32910 100644
--- a/grantleethemeeditor/editorpage.h
+++ b/grantleethemeeditor/editorpage.h
@@ -24,8 +24,7 @@
class KZip;
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class EditorWidget;
class PreviewWidget;
class GRANTLEETHEMEEDITOR_EXPORT EditorPage : public QWidget
diff --git a/grantleethemeeditor/editorwidget.cpp b/grantleethemeeditor/editorwidget.cpp
index 36f86b5..a471898 100644
--- a/grantleethemeeditor/editorwidget.cpp
+++ b/grantleethemeeditor/editorwidget.cpp
@@ -62,4 +62,3 @@ void EditorWidget::clear()
{
editor()->clear();
}
-
diff --git a/grantleethemeeditor/editorwidget.h b/grantleethemeeditor/editorwidget.h
index 900b580..d678a4f 100644
--- a/grantleethemeeditor/editorwidget.h
+++ b/grantleethemeeditor/editorwidget.h
@@ -22,8 +22,7 @@
#include "grantleethemeeditor_export.h"
#include "kpimtextedit/plaintexteditorwidget.h"
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class GRANTLEETHEMEEDITOR_EXPORT EditorWidget : public KPIMTextEdit::PlainTextEditorWidget
{
Q_OBJECT
diff --git a/grantleethemeeditor/grantleeplaintexteditor.cpp b/grantleethemeeditor/grantleeplaintexteditor.cpp
index 101cbbf..66dac09 100644
--- a/grantleethemeeditor/grantleeplaintexteditor.cpp
+++ b/grantleethemeeditor/grantleeplaintexteditor.cpp
@@ -49,7 +49,6 @@ GrantleePlainTextEditor::GrantleePlainTextEditor(QWidget *parent)
GrantleePlainTextEditor::~GrantleePlainTextEditor()
{
-
}
void GrantleePlainTextEditor::initCompleter()
@@ -82,4 +81,3 @@ void GrantleePlainTextEditor::keyPressEvent(QKeyEvent *e)
KPIMTextEdit::PlainTextEditor::keyPressEvent(e);
mTextEditorCompleter->completeText();
}
-
diff --git a/grantleethemeeditor/grantleeplaintexteditor.h b/grantleethemeeditor/grantleeplaintexteditor.h
index 58402d3..2673820 100644
--- a/grantleethemeeditor/grantleeplaintexteditor.h
+++ b/grantleethemeeditor/grantleeplaintexteditor.h
@@ -23,12 +23,10 @@
#include "config-grantleethemeeditor.h"
#include <KSyntaxHighlighting/Repository>
-namespace KPIMTextEdit
-{
+namespace KPIMTextEdit {
class TextEditorCompleter;
}
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class GrantleePlainTextEditor : public KPIMTextEdit::PlainTextEditor
{
Q_OBJECT
diff --git a/grantleethemeeditor/managethemes.cpp b/grantleethemeeditor/managethemes.cpp
index 4e4b34b..c572efc 100644
--- a/grantleethemeeditor/managethemes.cpp
+++ b/grantleethemeeditor/managethemes.cpp
@@ -37,10 +37,9 @@ class GrantleeThemeEditor::ManageThemesPrivate
{
public:
ManageThemesPrivate()
- : mListThemes(nullptr),
- mDeleteTheme(nullptr)
+ : mListThemes(nullptr)
+ , mDeleteTheme(nullptr)
{
-
}
QString mLocalDirectory;
@@ -49,8 +48,8 @@ public:
};
ManageThemes::ManageThemes(const QString &relativeThemePath, QWidget *parent)
- : QDialog(parent),
- d(new GrantleeThemeEditor::ManageThemesPrivate)
+ : QDialog(parent)
+ , d(new GrantleeThemeEditor::ManageThemesPrivate)
{
d->mLocalDirectory = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + relativeThemePath;
setWindowTitle(i18n("Manage Theme"));
@@ -146,4 +145,3 @@ void ManageThemes::slotItemSelectionChanged()
{
d->mDeleteTheme->setEnabled(!d->mListThemes->selectedItems().isEmpty());
}
-
diff --git a/grantleethemeeditor/managethemes.h b/grantleethemeeditor/managethemes.h
index 8b5335c..ccf1515 100644
--- a/grantleethemeeditor/managethemes.h
+++ b/grantleethemeeditor/managethemes.h
@@ -22,8 +22,7 @@
#include "grantleethemeeditor_export.h"
#include <QDialog>
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class ManageThemesPrivate;
class GRANTLEETHEMEEDITOR_EXPORT ManageThemes : public QDialog
{
diff --git a/grantleethemeeditor/newthemedialog.cpp b/grantleethemeeditor/newthemedialog.cpp
index 4c3abe3..d5f2b73 100644
--- a/grantleethemeeditor/newthemedialog.cpp
+++ b/grantleethemeeditor/newthemedialog.cpp
@@ -33,19 +33,19 @@ class GrantleeThemeEditor::NewThemeDialogPrivate
{
public:
NewThemeDialogPrivate()
- : mThemeName(nullptr),
- mUrlRequester(nullptr),
- mOkButton(nullptr)
+ : mThemeName(nullptr)
+ , mUrlRequester(nullptr)
+ , mOkButton(nullptr)
{
-
}
+
KLineEdit *mThemeName;
KUrlRequester *mUrlRequester;
QPushButton *mOkButton;
};
NewThemeDialog::NewThemeDialog(QWidget *parent)
- : QDialog(parent),
- d(new GrantleeThemeEditor::NewThemeDialogPrivate)
+ : QDialog(parent)
+ , d(new GrantleeThemeEditor::NewThemeDialogPrivate)
{
setWindowTitle(i18n("New Theme"));
@@ -116,4 +116,3 @@ void NewThemeDialog::slotUpdateOkButton()
d->mOkButton->setEnabled(!d->mUrlRequester->lineEdit()->text().trimmed().isEmpty()
&& !d->mThemeName->text().trimmed().isEmpty());
}
-
diff --git a/grantleethemeeditor/newthemedialog.h b/grantleethemeeditor/newthemedialog.h
index 3f156ed..4c7e6c1 100644
--- a/grantleethemeeditor/newthemedialog.h
+++ b/grantleethemeeditor/newthemedialog.h
@@ -22,8 +22,7 @@
#include "grantleethemeeditor_export.h"
#include <QDialog>
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class NewThemeDialogPrivate;
class GRANTLEETHEMEEDITOR_EXPORT NewThemeDialog : public QDialog
{
diff --git a/grantleethemeeditor/previewwidget.cpp b/grantleethemeeditor/previewwidget.cpp
index 159b4a8..7077cd6 100644
--- a/grantleethemeeditor/previewwidget.cpp
+++ b/grantleethemeeditor/previewwidget.cpp
@@ -21,14 +21,13 @@
using namespace GrantleeThemeEditor;
PreviewWidget::PreviewWidget(QWidget *parent)
- : QWidget(parent),
- mPrinting(false)
+ : QWidget(parent)
+ , mPrinting(false)
{
}
PreviewWidget::~PreviewWidget()
{
-
}
void PreviewWidget::updateViewer()
@@ -50,7 +49,6 @@ bool PreviewWidget::printing() const
void PreviewWidget::loadConfig()
{
-
}
void PreviewWidget::createScreenShot(const QStringList &lstFileName)
@@ -63,11 +61,8 @@ void PreviewWidget::setThemePath(const QString &projectDirectory, const QString
void PreviewWidget::slotMainFileNameChanged(const QString &)
{
-
}
void PreviewWidget::slotExtraHeaderDisplayChanged(const QStringList &headers)
{
-
}
-
diff --git a/grantleethemeeditor/previewwidget.h b/grantleethemeeditor/previewwidget.h
index 647f795..2d05689 100644
--- a/grantleethemeeditor/previewwidget.h
+++ b/grantleethemeeditor/previewwidget.h
@@ -21,8 +21,7 @@
#include <QWidget>
#include "grantleethemeeditor_export.h"
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class GRANTLEETHEMEEDITOR_EXPORT PreviewWidget : public QWidget
{
Q_OBJECT
diff --git a/grantleethemeeditor/themeeditortabwidget.cpp b/grantleethemeeditor/themeeditortabwidget.cpp
index 2d559bb..f6e00a5 100644
--- a/grantleethemeeditor/themeeditortabwidget.cpp
+++ b/grantleethemeeditor/themeeditortabwidget.cpp
@@ -75,4 +75,3 @@ void ThemeEditorTabWidget::slotTabContextMenuRequest(const QPoint &pos)
}
}
}
-
diff --git a/grantleethemeeditor/themeeditortabwidget.h b/grantleethemeeditor/themeeditortabwidget.h
index dc05501..cd402e6 100644
--- a/grantleethemeeditor/themeeditortabwidget.h
+++ b/grantleethemeeditor/themeeditortabwidget.h
@@ -21,8 +21,7 @@
#include "grantleethemeeditor_export.h"
#include <QTabWidget>
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class GRANTLEETHEMEEDITOR_EXPORT ThemeEditorTabWidget : public QTabWidget
{
Q_OBJECT
diff --git a/grantleethemeeditor/themesession.cpp b/grantleethemeeditor/themesession.cpp
index 30a6058..1f309b3 100644
--- a/grantleethemeeditor/themesession.cpp
+++ b/grantleethemeeditor/themesession.cpp
@@ -28,9 +28,9 @@
using namespace GrantleeThemeEditor;
ThemeSession::ThemeSession(const QString &projectDirectory, const QString &themeTypeName)
- : mProjectDirectory(projectDirectory),
- mThemeTypeName(themeTypeName),
- mVersion(1)
+ : mProjectDirectory(projectDirectory)
+ , mThemeTypeName(themeTypeName)
+ , mVersion(1)
{
}
diff --git a/grantleethemeeditor/themesession.h b/grantleethemeeditor/themesession.h
index 5738a3d..0498aad 100644
--- a/grantleethemeeditor/themesession.h
+++ b/grantleethemeeditor/themesession.h
@@ -22,8 +22,7 @@
#include <QString>
#include <QStringList>
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class GRANTLEETHEMEEDITOR_EXPORT ThemeSession
{
public:
diff --git a/headerthemeeditor/defaultcompletion.h b/headerthemeeditor/defaultcompletion.h
index f5d8875..819a743 100644
--- a/headerthemeeditor/defaultcompletion.h
+++ b/headerthemeeditor/defaultcompletion.h
@@ -21,8 +21,7 @@
#include <QStringList>
-namespace DefaultCompletion
-{
+namespace DefaultCompletion {
QStringList defaultCompetion();
QStringList defaultOptions();
}
diff --git a/headerthemeeditor/editorpage.cpp b/headerthemeeditor/editorpage.cpp
index 08d14f1..f83603d 100644
--- a/headerthemeeditor/editorpage.cpp
+++ b/headerthemeeditor/editorpage.cpp
@@ -34,8 +34,8 @@
#include <KSharedConfig>
EditorPage::EditorPage(GrantleeThemeEditor::EditorPage::PageType type, const QString &projectDirectory, QWidget *parent)
- : GrantleeThemeEditor::EditorPage(type, parent),
- mWidgetSplitter(nullptr)
+ : GrantleeThemeEditor::EditorPage(type, parent)
+ , mWidgetSplitter(nullptr)
{
QVBoxLayout *lay = new QVBoxLayout(this);
lay->setMargin(0);
@@ -73,7 +73,9 @@ EditorPage::EditorPage(GrantleeThemeEditor::EditorPage::PageType type, const QSt
if (mType == MainPage) {
KConfigGroup group(KSharedConfig::openConfig(), "EditorPage");
- const QList<int> size{400, 100};
+ const QList<int> size {
+ 400, 100
+ };
mMainSplitter->setSizes(group.readEntry("mainSplitter", size));
mWidgetSplitter->setSizes(group.readEntry("widgetSplitter", size));
}
@@ -92,4 +94,3 @@ GrantleeThemeEditor::PreviewWidget *EditorPage::preview() const
{
return mPreview;
}
-
diff --git a/headerthemeeditor/editorpage.h b/headerthemeeditor/editorpage.h
index 19771c2..c048027 100644
--- a/headerthemeeditor/editorpage.h
+++ b/headerthemeeditor/editorpage.h
@@ -24,8 +24,7 @@
class ThemeTemplateWidget;
class EditorWidget;
class QSplitter;
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class EditorWidget;
class PreviewWidget;
}
diff --git a/headerthemeeditor/previewwidget.cpp b/headerthemeeditor/previewwidget.cpp
index 327f54a..22126c1 100644
--- a/headerthemeeditor/previewwidget.cpp
+++ b/headerthemeeditor/previewwidget.cpp
@@ -100,4 +100,3 @@ void PreviewWidget::setThemePath(const QString &projectDirectory, const QString
mGrantleeHeaderStyle->setMainFilename(mainPageFileName);
updateViewer();
}
-
diff --git a/headerthemeeditor/previewwidget.h b/headerthemeeditor/previewwidget.h
index 6735e9d..7dbe5b9 100644
--- a/headerthemeeditor/previewwidget.h
+++ b/headerthemeeditor/previewwidget.h
@@ -20,8 +20,7 @@
#define PREVIEWWIDGET_H
#include "grantleethemeeditor/previewwidget.h"
-namespace MessageViewer
-{
+namespace MessageViewer {
class Viewer;
class GrantleeHeaderTestStyle;
}
diff --git a/headerthemeeditor/themeconfiguredialog.cpp b/headerthemeeditor/themeconfiguredialog.cpp
index 47e9ddd..a635005 100644
--- a/headerthemeeditor/themeconfiguredialog.cpp
+++ b/headerthemeeditor/themeconfiguredialog.cpp
@@ -125,4 +125,3 @@ void ThemeConfigureDialog::writeConfig()
group.writeEntry("defaultTemplate", mDefaultTemplate->toPlainText());
mConfigureWidget->writeConfig();
}
-
diff --git a/headerthemeeditor/themeconfiguredialog.h b/headerthemeeditor/themeconfiguredialog.h
index 173fb4e..d552087 100644
--- a/headerthemeeditor/themeconfiguredialog.h
+++ b/headerthemeeditor/themeconfiguredialog.h
@@ -21,12 +21,10 @@
#include <QDialog>
-namespace KPIMTextEdit
-{
+namespace KPIMTextEdit {
class PlainTextEditorWidget;
}
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class ConfigureWidget;
}
diff --git a/headerthemeeditor/themedefaulttemplate.cpp b/headerthemeeditor/themedefaulttemplate.cpp
index 1dbd900..6baa14b 100644
--- a/headerthemeeditor/themedefaulttemplate.cpp
+++ b/headerthemeeditor/themedefaulttemplate.cpp
@@ -50,4 +50,3 @@ QVector<PimCommon::defaultTemplate> ThemeDefaultTemplate::defaultTemplates()
return lst;
}
-
diff --git a/headerthemeeditor/themedefaulttemplate.h b/headerthemeeditor/themedefaulttemplate.h
index 7517113..d2fc054 100644
--- a/headerthemeeditor/themedefaulttemplate.h
+++ b/headerthemeeditor/themedefaulttemplate.h
@@ -21,11 +21,8 @@
#include <PimCommon/TemplateListWidget>
-namespace ThemeDefaultTemplate
-{
-
+namespace ThemeDefaultTemplate {
QVector<PimCommon::defaultTemplate> defaultTemplates();
-
}
#endif // THEMEDEFAULTTEMPLATE_H
diff --git a/headerthemeeditor/themeeditormainwindow.cpp b/headerthemeeditor/themeeditormainwindow.cpp
index 23a5eb2..4cdc04f 100644
--- a/headerthemeeditor/themeeditormainwindow.cpp
+++ b/headerthemeeditor/themeeditormainwindow.cpp
@@ -41,8 +41,8 @@
#include <QStandardPaths>
ThemeEditorMainWindow::ThemeEditorMainWindow()
- : KXmlGuiWindow(),
- mThemeEditor(nullptr)
+ : KXmlGuiWindow()
+ , mThemeEditor(nullptr)
{
setupActions();
setupGUI();
@@ -128,12 +128,12 @@ void ThemeEditorMainWindow::setupActions()
QActionGroup *group = new QActionGroup(this);
- mPrintingMode = new KToggleAction(i18n("Printing mode"), this);
+ mPrintingMode = new KToggleAction(i18n("Printing mode"), this);
actionCollection()->addAction(QStringLiteral("printing_mode"), mPrintingMode);
connect(mPrintingMode, &KToggleAction::triggered, this, &ThemeEditorMainWindow::slotPrintingMode);
group->addAction(mPrintingMode);
- mNormalMode = new KToggleAction(i18n("Normal mode"), this);
+ mNormalMode = new KToggleAction(i18n("Normal mode"), this);
mNormalMode->setChecked(true);
actionCollection()->addAction(QStringLiteral("normal_mode"), mNormalMode);
connect(mNormalMode, &KToggleAction::triggered, this, &ThemeEditorMainWindow::slotNormalMode);
@@ -147,7 +147,6 @@ void ThemeEditorMainWindow::setupActions()
actionCollection()->setDefaultShortcut(mUpdateView, QKeySequence(Qt::Key_F5));
connect(mUpdateView, &QAction::triggered, this, &ThemeEditorMainWindow::slotUpdateView);
actionCollection()->addAction(QStringLiteral("update_view"), mUpdateView);
-
}
void ThemeEditorMainWindow::slotManageTheme()
@@ -277,11 +276,11 @@ bool ThemeEditorMainWindow::saveCurrentProject(ActionSaveTheme act)
switch (act) {
case SaveOnly:
break;
- case SaveAndCloseTheme: {
+ case SaveAndCloseTheme:
closeThemeEditor();
break;
- }
- case SaveAndCreateNewTheme: {
+ case SaveAndCreateNewTheme:
+ {
delete mThemeEditor;
mThemeEditor = nullptr;
QPointer<GrantleeThemeEditor::NewThemeDialog> dialog = new GrantleeThemeEditor::NewThemeDialog(this);
@@ -363,4 +362,3 @@ void ThemeEditorMainWindow::slotSaveAsTheme()
}
}
}
-
diff --git a/headerthemeeditor/themeeditorpage.cpp b/headerthemeeditor/themeeditorpage.cpp
index 5d28835..9201f7e 100644
--- a/headerthemeeditor/themeeditorpage.cpp
+++ b/headerthemeeditor/themeeditorpage.cpp
@@ -40,9 +40,9 @@
#include <QFileDialog>
ThemeEditorPage::ThemeEditorPage(const QString &projectDir, const QString &themeName, QWidget *parent)
- : QWidget(parent),
- mThemeSession(new GrantleeThemeEditor::ThemeSession(projectDir, QStringLiteral("headerthemeeditor"))),
- mChanged(false)
+ : QWidget(parent)
+ , mThemeSession(new GrantleeThemeEditor::ThemeSession(projectDir, QStringLiteral("headerthemeeditor")))
+ , mChanged(false)
{
QHBoxLayout *lay = new QHBoxLayout;
mTabWidget = new GrantleeThemeEditor::ThemeEditorTabWidget;
@@ -199,7 +199,7 @@ void ThemeEditorPage::uploadTheme()
lst << previewFileName;
mEditorPage->preview()->createScreenShot(lst);
- const bool fileAdded = zip->addLocalFile(previewFileName, themename + QLatin1Char('/') + QLatin1String("theme_preview.png"));
+ const bool fileAdded = zip->addLocalFile(previewFileName, themename + QLatin1Char('/') + QLatin1String("theme_preview.png"));
if (!fileAdded) {
KMessageBox::error(this, i18n("We cannot add preview file in zip file"), i18n("Failed to add file."));
delete zip;
@@ -325,4 +325,3 @@ void ThemeEditorPage::saveThemeAs(const QString &directory)
{
storeTheme(directory);
}
-
diff --git a/headerthemeeditor/themeeditorpage.h b/headerthemeeditor/themeeditorpage.h
index 855f4e2..a533f54 100644
--- a/headerthemeeditor/themeeditorpage.h
+++ b/headerthemeeditor/themeeditorpage.h
@@ -21,8 +21,7 @@
#include <QWidget>
-namespace GrantleeThemeEditor
-{
+namespace GrantleeThemeEditor {
class ThemeEditorTabWidget;
class ThemeSession;
class DesktopFilePage;
diff --git a/headerthemeeditor/themeeditorwidget.cpp b/headerthemeeditor/themeeditorwidget.cpp
index fb1a19a..cb7b3d8 100644
--- a/headerthemeeditor/themeeditorwidget.cpp
+++ b/headerthemeeditor/themeeditorwidget.cpp
@@ -37,4 +37,3 @@ void ThemeEditorWidget::createCompleterList(const QStringList &extraCompletion)
listWord << extraCompletion;
GrantleeThemeEditor::EditorWidget::createCompleterList(listWord);
}
-
diff --git a/headerthemeeditor/themetemplatewidget.cpp b/headerthemeeditor/themetemplatewidget.cpp
index b061758..3c259dc 100644
--- a/headerthemeeditor/themetemplatewidget.cpp
+++ b/headerthemeeditor/themetemplatewidget.cpp
@@ -54,4 +54,3 @@ ThemeTemplateWidget::ThemeTemplateWidget(const QString &title, QWidget *parent)
ThemeTemplateWidget::~ThemeTemplateWidget()
{
}
-