aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/about
diff options
context:
space:
mode:
authorGravatar Alexey Sokolov2016-04-29 23:57:30 +0100
committerGravatar Alexey Sokolov2016-04-29 23:57:48 +0100
commit690dd7a33ddc90678367d73adf313533536e10f2 (patch)
tree2276fe7c384ebbc222b40a19c536d5c3c5606ce8 /src/modules/about
parentAdd config for clang-format. (diff)
downloadKVIrc-690dd7a33ddc90678367d73adf313533536e10f2.tar.gz
KVIrc-690dd7a33ddc90678367d73adf313533536e10f2.tar.bz2
KVIrc-690dd7a33ddc90678367d73adf313533536e10f2.zip
Apply clang-format
Diffstat (limited to 'src/modules/about')
-rw-r--r--src/modules/about/AboutDialog.cpp89
-rw-r--r--src/modules/about/AboutDialog.h3
-rw-r--r--src/modules/about/libkviabout.cpp36
3 files changed, 63 insertions, 65 deletions
diff --git a/src/modules/about/AboutDialog.cpp b/src/modules/about/AboutDialog.cpp
index fcf9a9a38..8c8e48239 100644
--- a/src/modules/about/AboutDialog.cpp
+++ b/src/modules/about/AboutDialog.cpp
@@ -74,14 +74,14 @@ extern AboutDialog * g_pAboutDialog;
#include "abouttext.inc"
AboutDialog::AboutDialog()
-: KviTalTabDialog(0)
+ : KviTalTabDialog(0)
{
- setWindowTitle(__tr2qs_ctx("About KVIrc","about"));
- setOkButton(__tr2qs_ctx("Close","about"));
+ setWindowTitle(__tr2qs_ctx("About KVIrc", "about"));
+ setOkButton(__tr2qs_ctx("Close", "about"));
// About tab
QString buffer;
- g_pApp->findImage(buffer,"kvi_release_art.png");
+ g_pApp->findImage(buffer, "kvi_release_art.png");
QPixmap pix(buffer);
@@ -96,17 +96,16 @@ AboutDialog::AboutDialog()
l->setAlignment(Qt::AlignCenter);
l->setPixmap(pix);
- g->addWidget(l,0,0);
+ g->addWidget(l, 0, 0);
- QString aboutString= "<b>KVIrc " KVI_VERSION " '" KVI_RELEASE_NAME "'</b><br>";
- aboutString += __tr2qs_ctx("Forged by the <b>KVIrc Development Team</b>","about");
+ QString aboutString = "<b>KVIrc " KVI_VERSION " '" KVI_RELEASE_NAME "'</b><br>";
+ aboutString += __tr2qs_ctx("Forged by the <b>KVIrc Development Team</b>", "about");
- l = new QLabel(aboutString,w);
+ l = new QLabel(aboutString, w);
l->setAlignment(Qt::AlignCenter);
- g->addWidget(l,1,0);
-
- addTab(w,__tr2qs_ctx("About","about"));
+ g->addWidget(l, 1, 0);
+ addTab(w, __tr2qs_ctx("About", "about"));
// Info tab
w = new QWidget(this);
@@ -114,14 +113,14 @@ AboutDialog::AboutDialog()
QTextEdit * v = new QTextEdit(w);
v->setReadOnly(true);
- g->addWidget(v,0,0);
+ g->addWidget(v, 0, 0);
// Get info
QString infoString = "<b>KVIrc " KVI_VERSION " '" KVI_RELEASE_NAME "'</b><br><br>";
infoString += "<b>";
- infoString += __tr2qs_ctx("Runtime Info","about");
+ infoString += __tr2qs_ctx("Runtime Info", "about");
infoString += ":</b><br>";
- infoString += __tr2qs_ctx("System name","about");
+ infoString += __tr2qs_ctx("System name", "about");
infoString += ": ";
infoString += KviRuntimeInfo::name();
#ifndef COMPILE_ON_MAC
@@ -129,74 +128,73 @@ AboutDialog::AboutDialog()
infoString += KviRuntimeInfo::release();
#endif
infoString += "<br>";
- infoString += __tr2qs_ctx("System version","about");
+ infoString += __tr2qs_ctx("System version", "about");
infoString += ": ";
infoString += KviRuntimeInfo::version();
infoString += "<br>";
- infoString += __tr2qs_ctx("Architecture","about");
+ infoString += __tr2qs_ctx("Architecture", "about");
infoString += ": ";
infoString += KviRuntimeInfo::machine();
infoString += "<br>";
- infoString += __tr2qs_ctx("Qt version","about");
+ infoString += __tr2qs_ctx("Qt version", "about");
infoString += ": ";
infoString += KviRuntimeInfo::qtVersion();
infoString += "<br>";
- infoString += __tr2qs_ctx("Qt theme","about");
+ infoString += __tr2qs_ctx("Qt theme", "about");
infoString += ": ";
infoString += KviRuntimeInfo::qtTheme();
infoString += "<br><br>";
infoString += "<b>";
- infoString += __tr2qs_ctx("Build Info","about");
+ infoString += __tr2qs_ctx("Build Info", "about");
infoString += ":</b><br>";
- infoString += __tr2qs_ctx("Build date","about");
+ infoString += __tr2qs_ctx("Build date", "about");
infoString += ": ";
infoString += KviBuildInfo::buildDate();
infoString += "<br>";
- infoString += __tr2qs_ctx("Sources date","about");
+ infoString += __tr2qs_ctx("Sources date", "about");
infoString += ": ";
infoString += KviBuildInfo::buildSourcesDate();
infoString += "<br>";
- infoString += __tr2qs_ctx("Revision number","about");
+ infoString += __tr2qs_ctx("Revision number", "about");
infoString += ": ";
infoString += KviBuildInfo::buildRevision();
infoString += "<br>";
- infoString += __tr2qs_ctx("System name","about");
+ infoString += __tr2qs_ctx("System name", "about");
infoString += ": ";
infoString += KviBuildInfo::buildSystem();
infoString += "<br>";
- infoString += __tr2qs_ctx("CPU name","about");
+ infoString += __tr2qs_ctx("CPU name", "about");
infoString += ": ";
infoString += KviBuildInfo::buildCPU();
infoString += "<br>";
- infoString += __tr2qs_ctx("Build command","about");
+ infoString += __tr2qs_ctx("Build command", "about");
infoString += ": ";
infoString += KviBuildInfo::buildCommand();
infoString += "<br>";
- infoString += __tr2qs_ctx("Build flags","about");
+ infoString += __tr2qs_ctx("Build flags", "about");
infoString += ": <br>&nbsp;&nbsp;&nbsp;";
QString flags = KviBuildInfo::buildFlags();
- infoString += flags.replace(QRegExp(";"),"<br>&nbsp;&nbsp;&nbsp;");
+ infoString += flags.replace(QRegExp(";"), "<br>&nbsp;&nbsp;&nbsp;");
infoString += "<br>";
- infoString += __tr2qs_ctx("Compiler name","about");
+ infoString += __tr2qs_ctx("Compiler name", "about");
infoString += ": ";
infoString += KviBuildInfo::buildCompiler();
infoString += "<br>";
- infoString += __tr2qs_ctx("Compiler flags","about");
+ infoString += __tr2qs_ctx("Compiler flags", "about");
infoString += ": ";
infoString += KviBuildInfo::buildCompilerFlags();
infoString += "<br>";
- infoString += __tr2qs_ctx("Qt version","about");
+ infoString += __tr2qs_ctx("Qt version", "about");
infoString += ": ";
infoString += KviBuildInfo::qtVersion();
infoString += "<br>";
- infoString += __tr2qs_ctx("Features","about");
+ infoString += __tr2qs_ctx("Features", "about");
infoString += ": ";
infoString += KviBuildInfo::features();
v->setText(infoString);
- addTab(w,__tr2qs_ctx("Executable Information","about"));
-
+ addTab(w, __tr2qs_ctx("Executable Information", "about"));
// Honor & Glory tab
w = new QWidget(this);
@@ -204,12 +202,11 @@ AboutDialog::AboutDialog()
v = new QTextEdit(w);
v->setReadOnly(true);
- g->addWidget(v,0,0);
+ g->addWidget(v, 0, 0);
v->setText(g_szAboutText);
- addTab(w,__tr2qs_ctx("Honor && Glory","about"));
-
+ addTab(w, __tr2qs_ctx("Honor && Glory", "about"));
// License tab
w = new QWidget(this);
@@ -218,26 +215,26 @@ AboutDialog::AboutDialog()
v = new QTextEdit(w);
v->setReadOnly(true);
v->setWordWrapMode(QTextOption::NoWrap);
- g->addWidget(v,0,0);
+ g->addWidget(v, 0, 0);
QString szLicense;
QString szLicensePath;
- g_pApp->getGlobalKvircDirectory(szLicensePath,KviApplication::License,"COPYING");
+ g_pApp->getGlobalKvircDirectory(szLicensePath, KviApplication::License, "COPYING");
- if(!KviFileUtils::loadFile(szLicensePath,szLicense))
+ if(!KviFileUtils::loadFile(szLicensePath, szLicense))
{
- szLicense = __tr2qs_ctx("Oops! Can't find the license file.\n" \
- "It MUST be included in the distribution...\n" \
- "Please report to <pragma at kvirc dot net>","about");
+ szLicense = __tr2qs_ctx("Oops! Can't find the license file.\n"
+ "It MUST be included in the distribution...\n"
+ "Please report to <pragma at kvirc dot net>",
+ "about");
}
v->setText(szLicense);
- addTab(w,__tr2qs_ctx("License","about"));
-
+ addTab(w, __tr2qs_ctx("License", "about"));
- connect(this,SIGNAL(applyButtonPressed()),this,SLOT(closeButtonPressed()));
+ connect(this, SIGNAL(applyButtonPressed()), this, SLOT(closeButtonPressed()));
}
AboutDialog::~AboutDialog()
@@ -245,7 +242,7 @@ AboutDialog::~AboutDialog()
g_pAboutDialog = 0;
}
-void AboutDialog::closeEvent(QCloseEvent *e)
+void AboutDialog::closeEvent(QCloseEvent * e)
{
e->ignore();
delete this;
diff --git a/src/modules/about/AboutDialog.h b/src/modules/about/AboutDialog.h
index 7a94667cf..7f4f819df 100644
--- a/src/modules/about/AboutDialog.h
+++ b/src/modules/about/AboutDialog.h
@@ -32,8 +32,9 @@ class AboutDialog : public KviTalTabDialog
public:
AboutDialog();
~AboutDialog();
+
protected:
- virtual void closeEvent(QCloseEvent *e);
+ virtual void closeEvent(QCloseEvent * e);
protected slots:
void closeButtonPressed();
};
diff --git a/src/modules/about/libkviabout.cpp b/src/modules/about/libkviabout.cpp
index 9b2d726b6..05ed81adb 100644
--- a/src/modules/about/libkviabout.cpp
+++ b/src/modules/about/libkviabout.cpp
@@ -55,34 +55,35 @@ AboutDialog * g_pAboutDialog = 0;
[/example]
*/
-
static bool about_kvs_command_kvirc(KviKvsModuleCommandCall *)
{
- if(!g_pAboutDialog)
+ if(!g_pAboutDialog)
{
g_pAboutDialog = new AboutDialog();
g_pAboutDialog->show();
- } else {
+ }
+ else
+ {
g_pAboutDialog->raise();
g_pAboutDialog->show();
}
return true;
}
-
// =======================================
// init routine
// =======================================
static bool about_module_init(KviModule * m)
{
- KVSM_REGISTER_SIMPLE_COMMAND(m,"kvirc",about_kvs_command_kvirc)
+ KVSM_REGISTER_SIMPLE_COMMAND(m, "kvirc", about_kvs_command_kvirc)
return true;
}
static bool about_module_cleanup(KviModule *)
{
- if(g_pAboutDialog)delete g_pAboutDialog;
+ if(g_pAboutDialog)
+ delete g_pAboutDialog;
g_pAboutDialog = 0;
return true;
}
@@ -97,15 +98,14 @@ static bool about_module_can_unload(KviModule *)
// =======================================
KVIRC_MODULE(
- "KVIrc about dialog",
- "4.0.0",
- "Till Bush <buti@geocities.com>\n" \
- "Szymon Stefanek <pragma at kvirc dot net>" \
- "Elvio Basello <hellvis69 at netsons dot org>",
- "Exports the /about.kvirc command\n",
- about_module_init,
- about_module_can_unload,
- 0,
- about_module_cleanup,
- "about"
-)
+ "KVIrc about dialog",
+ "4.0.0",
+ "Till Bush <buti@geocities.com>\n"
+ "Szymon Stefanek <pragma at kvirc dot net>"
+ "Elvio Basello <hellvis69 at netsons dot org>",
+ "Exports the /about.kvirc command\n",
+ about_module_init,
+ about_module_can_unload,
+ 0,
+ about_module_cleanup,
+ "about")