From e227679b0af3687acf9292953edbb0ebeab19df9 Mon Sep 17 00:00:00 2001 From: Matt Ullman Date: Sun, 18 Oct 2015 05:16:18 -0400 Subject: Clean up trailing whitespaces and excess newlines Oh how I can already hear the sound of angry villagers with pitchforks running over to my desk --- src/modules/theme/PackThemeDialog.cpp | 1 - src/modules/theme/SaveThemeDialog.cpp | 3 +-- src/modules/theme/ThemeFunctions.cpp | 29 +++++++++++++-------------- src/modules/theme/ThemeManagementDialog.cpp | 3 +-- src/modules/theme/WebThemeInterfaceDialog.cpp | 1 - src/modules/theme/WebThemeInterfaceDialog.h | 1 - src/modules/theme/libkvitheme.cpp | 2 +- 7 files changed, 17 insertions(+), 23 deletions(-) (limited to 'src/modules/theme') diff --git a/src/modules/theme/PackThemeDialog.cpp b/src/modules/theme/PackThemeDialog.cpp index 32691a4d1..4394c0913 100644 --- a/src/modules/theme/PackThemeDialog.cpp +++ b/src/modules/theme/PackThemeDialog.cpp @@ -465,4 +465,3 @@ bool PackThemeDialog::packTheme() return true; } - diff --git a/src/modules/theme/SaveThemeDialog.cpp b/src/modules/theme/SaveThemeDialog.cpp index 4b4af497c..19e3ede75 100644 --- a/src/modules/theme/SaveThemeDialog.cpp +++ b/src/modules/theme/SaveThemeDialog.cpp @@ -163,7 +163,7 @@ SaveThemeDialog::SaveThemeDialog(QWidget * pParent) ozText += __tr2qs_ctx("Hit the \"Next\" button to continue.","theme"); ozText += "

"; - pLayout->addWidget(m_pSaveIconsCheckBox,0,0); + pLayout->addWidget(m_pSaveIconsCheckBox,0,0); pLabel->setText(ozText); pLayout->addWidget(pLabel,1,0); pLayout->setRowStretch(2,1); @@ -323,4 +323,3 @@ bool SaveThemeDialog::saveTheme() return true; } - diff --git a/src/modules/theme/ThemeFunctions.cpp b/src/modules/theme/ThemeFunctions.cpp index e0542534e..c1e464049 100644 --- a/src/modules/theme/ThemeFunctions.cpp +++ b/src/modules/theme/ThemeFunctions.cpp @@ -381,7 +381,7 @@ namespace ThemeFunctions g_pMainWindow->showNormal(); return bResult; } - + bool packageThemes( const QString &szPackagePath, @@ -416,15 +416,15 @@ namespace ThemeFunctions szError = __tr2qs_ctx("Failed to load the selected image: please fix it","theme"); return false; } - + if((pix.width() > 300) || (pix.height() > 225)) out = out.fromImage(pix.scaled(300,225,Qt::KeepAspectRatio)); else out=out.fromImage(pix); } - + KviPackageWriter f; - + f.addInfoField("PackageType","ThemePack"); f.addInfoField("ThemePackVersion",KVI_CURRENT_THEME_ENGINE_VERSION); f.addInfoField("Name",szPackageName); @@ -435,7 +435,7 @@ namespace ThemeFunctions // to ensure qt4 will use the default() locale and not the system() one f.addInfoField("Date",QDateTime::currentDateTime().toString(Qt::ISODate)); f.addInfoField("Application","KVIrc " KVI_VERSION "." KVI_SOURCES_DATE); - + if(!out.isNull()) { QByteArray * pba = new QByteArray(); @@ -445,12 +445,12 @@ namespace ThemeFunctions buffer.close(); f.addInfoField("Image",pba); // cool :) [no disk access needed] } - + QString szTmp; - + szTmp.setNum(lThemeInfoList.count()); f.addInfoField("ThemeCount",szTmp); - + int iIdx = 0; for(KviThemeInfo * pInfo = lThemeInfoList.first();pInfo;pInfo = lThemeInfoList.next()) { @@ -464,10 +464,10 @@ namespace ThemeFunctions szError = __tr2qs_ctx("Invalid theme version","theme"); return false; } - + QString szSubdir = pInfo->name() + QString("-") + pInfo->version(); szSubdir.replace(QRegExp("[^a-zA-Z0-9_\\-.][^a-zA-Z0-9_\\-.]*"),"_"); - + szTmp = QString("Theme%1Name").arg(iIdx); f.addInfoField(szTmp,pInfo->name()); szTmp = QString("Theme%1Version").arg(iIdx); @@ -489,7 +489,7 @@ namespace ThemeFunctions { szTmp = QString("Theme%1Screenshot").arg(iIdx); QByteArray * pba = new QByteArray(); - + QBuffer bufferz(pba,0); bufferz.open(QIODevice::WriteOnly); pixScreenshot.save(&bufferz,"PNG"); @@ -504,10 +504,10 @@ namespace ThemeFunctions szError += f.lastError(); return false; } - + iIdx++; } - + if(!f.pack(szPackagePath)) { szError = __tr2qs_ctx("Packaging failed","theme"); @@ -515,8 +515,7 @@ namespace ThemeFunctions szError += f.lastError(); return false; } - + return true; } } - diff --git a/src/modules/theme/ThemeManagementDialog.cpp b/src/modules/theme/ThemeManagementDialog.cpp index a20c2f7fd..434c9b69d 100644 --- a/src/modules/theme/ThemeManagementDialog.cpp +++ b/src/modules/theme/ThemeManagementDialog.cpp @@ -468,7 +468,7 @@ void ThemeManagementDialog::fillThemeBox(bool bBuiltin) for(int i=0;iload(slThemes.at(i),bBuiltin ? KviThemeInfo::Builtin : KviThemeInfo::User)) { @@ -556,4 +556,3 @@ void ThemeManagementDialog::tipRequest(QListWidgetItem *,const QPoint &) // pTip->tip(m_pListWidget->visualItemRect(it),szThemeDescription); */ } - diff --git a/src/modules/theme/WebThemeInterfaceDialog.cpp b/src/modules/theme/WebThemeInterfaceDialog.cpp index ceb4e9ca0..eb0d1dbed 100644 --- a/src/modules/theme/WebThemeInterfaceDialog.cpp +++ b/src/modules/theme/WebThemeInterfaceDialog.cpp @@ -76,4 +76,3 @@ bool WebThemeInterfaceDialog::packageIsInstalled(const QString &szId,const QStri #endif //COMPILE_WEBKIT_SUPPORT - diff --git a/src/modules/theme/WebThemeInterfaceDialog.h b/src/modules/theme/WebThemeInterfaceDialog.h index dac3efc74..e8e9a1533 100644 --- a/src/modules/theme/WebThemeInterfaceDialog.h +++ b/src/modules/theme/WebThemeInterfaceDialog.h @@ -53,4 +53,3 @@ protected: #endif //_WEBTHEMEINTERFACEDIALOG_H_ - diff --git a/src/modules/theme/libkvitheme.cpp b/src/modules/theme/libkvitheme.cpp index 46b8d671c..bf26f9116 100644 --- a/src/modules/theme/libkvitheme.cpp +++ b/src/modules/theme/libkvitheme.cpp @@ -307,7 +307,7 @@ static bool theme_kvs_cmd_pack(KviKvsModuleCommandCall * c) kvs_uint_t s = pArray->size(); QStringList lThemeList; - + for(kvs_uint_t i=0;iat(i); -- cgit v1.3.1-10-gc9f91