aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Elvio Basello2008-04-20 02:29:25 +0000
committerGravatar Elvio Basello2008-04-20 02:29:25 +0000
commit5797cdd96527c2f08b37956d0f853edef76d3fb6 (patch)
tree7f8b384c81cb6f5f7d0b7c64ccff6dabd6f6a2b7 /src
parentSplitted system configuration in two files. The frequently changing stuff in ... (diff)
downloadKVIrc-5797cdd96527c2f08b37956d0f853edef76d3fb6.tar.gz
KVIrc-5797cdd96527c2f08b37956d0f853edef76d3fb6.tar.bz2
KVIrc-5797cdd96527c2f08b37956d0f853edef76d3fb6.zip
more work on about module (wip)
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1526 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
-rw-r--r--src/kvilib/config/kvi_buildinfo.cpp36
-rw-r--r--src/kvilib/config/kvi_buildinfo.h9
-rw-r--r--src/kvilib/ext/kvi_osinfo.cpp16
-rw-r--r--src/modules/about/aboutdialog.cpp56
4 files changed, 99 insertions, 18 deletions
diff --git a/src/kvilib/config/kvi_buildinfo.cpp b/src/kvilib/config/kvi_buildinfo.cpp
index 7d00bddd6..95676d045 100644
--- a/src/kvilib/config/kvi_buildinfo.cpp
+++ b/src/kvilib/config/kvi_buildinfo.cpp
@@ -5,6 +5,7 @@
//
// This file is part of the KVIrc IRC Client distribution
// Copyright (C) 2008 Szymon Stefanek <s.stefanek at libero dot it>
+// Copyright (C) 2008 Elvio Basello <hellvis69 at netsons dot org>
//
// This program is FREE software. You can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -36,4 +37,39 @@ namespace KviBuildInfo
{
return QString(KVIRC_BUILD_DATE);
}
+
+ QString buildSourcesDate()
+ {
+ return QString(KVI_SOURCES_DATE);
+ }
+
+ QString buildCommand()
+ {
+ return QString(KVI_BUILD_COMMAND);
+ }
+
+ QString buildFlags()
+ {
+ return QString(KVI_BUILD_FLAGS);
+ }
+
+ QString buildSystem()
+ {
+ return QString(KVI_BUILD_SYSTEM);
+ }
+
+ QString buildCPU()
+ {
+ return QString(KVI_BUILD_CPU);
+ }
+
+ QString buildCompiler()
+ {
+ return QString(KVI_BUILD_COMPILER);
+ }
+
+ QString buildCompilerFlags()
+ {
+ return QString(KVI_BUILD_COMPILER_FLAGS);
+ }
};
diff --git a/src/kvilib/config/kvi_buildinfo.h b/src/kvilib/config/kvi_buildinfo.h
index f17b19557..b9dfc26d6 100644
--- a/src/kvilib/config/kvi_buildinfo.h
+++ b/src/kvilib/config/kvi_buildinfo.h
@@ -7,6 +7,7 @@
//
// This file is part of the KVIrc IRC Client distribution
// Copyright (C) 2008 Szymon Stefanek <s.stefanek at libero dot it>
+// Copyright (C) 2008 Elvio Basello <hellvis69 at netsons dot org>
//
// This program is FREE software. You can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -25,12 +26,20 @@
//=============================================================================
#include "kvi_settings.h"
+#include "kvi_sourcesdate.h"
#include <QString>
namespace KviBuildInfo
{
QString buildDate();
+ QString buildSourcesDate();
+ QString buildCommand();
+ QString buildFlags();
+ QString buildSystem();
+ QString buildCPU();
+ QString buildCompiler();
+ QString buildCompilerFlags();
};
#endif //!_KVI_BUILDINFO_H_
diff --git a/src/kvilib/ext/kvi_osinfo.cpp b/src/kvilib/ext/kvi_osinfo.cpp
index 68a089bb5..ba2eff281 100644
--- a/src/kvilib/ext/kvi_osinfo.cpp
+++ b/src/kvilib/ext/kvi_osinfo.cpp
@@ -78,7 +78,7 @@ typedef BOOL (WINAPI *PGETPRODUCTINFO)(DWORD,DWORD,DWORD,DWORD,PDWORD);
#define PRODUCT_ULTIMATE 0x00000001
#define PRODUCT_WEB_SERVER 0x00000011
-static QString queryWinInfo( QueryInfo info)
+static QString queryWinInfo(QueryInfo info)
{
QString szVersion;
OSVERSIONINFOEX osvi;
@@ -429,23 +429,23 @@ namespace KviOsInfo
#ifdef COMPILE_ON_WINDOWS
return queryWinInfo(Os_Type);
#else
- #ifdef Q_OS_MACX
- return "macosx";
- #else
- return "unix";
- #endif
+ return "UNIX";
#endif
}
-
+
QString name()
{
#ifdef COMPILE_ON_WINDOWS
- return "windows";
+ return "Windows";
#else
+ #ifdef Q_OS_MACX
+ return "MacOS X";
+ #else
struct utsname uts;
if(uname(&uts) == 0)
return QString::fromLocal8Bit(uts.sysname);
return KviQString::empty;
+ #endif
#endif
}
diff --git a/src/modules/about/aboutdialog.cpp b/src/modules/about/aboutdialog.cpp
index a47a8d965..aa68a3083 100644
--- a/src/modules/about/aboutdialog.cpp
+++ b/src/modules/about/aboutdialog.cpp
@@ -5,6 +5,7 @@
//
// This file is part of the KVirc irc client distribution
// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+// Copyright (C) 2008 Elvio Basello (hellvis69 at netsons dot org)
//
// This program is FREE software. You can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -30,6 +31,7 @@
#include "kvi_fileutils.h"
#include "kvi_sourcesdate.h"
#include "kvi_buildinfo.h"
+#include "kvi_osinfo.h"
#include <kvi_tal_textedit.h>
#include <QWidget>
@@ -112,26 +114,60 @@ KviAboutDialog::KviAboutDialog()
g->addWidget(v,0,0);
// Get info
- QString infoString = "KVIrc <b>" KVI_VERSION " '" KVI_RELEASE_NAME "'</b><br><br>";
+ QString infoString = "<b>KVIrc " KVI_VERSION " '" KVI_RELEASE_NAME "'</b><br><br>";
#ifndef COMPILE_ON_WINDOWS
+ infoString += "<b>";
+ infoString += __tr2qs_ctx("Runtime Info","about");
+ infoString += ":</b><br>";
+
infoString += __tr2qs_ctx("System Name","about");
- infoString += ": " KVI_BUILD_SYSTEM "<br>";
- infoString += __tr2qs_ctx("CPU Name","about");
- infoString += ": " KVI_BUILD_CPU "<br>";
- infoString += __tr2qs_ctx("Sources Date","about");
- infoString += ": " KVI_SOURCES_DATE "<br>";
+ infoString += ": ";
+ infoString += KviOsInfo::name();
+ infoString += " ";
+ infoString += KviOsInfo::release();
+ infoString += "<br>";
+ infoString += __tr2qs_ctx("System Version","about");
+ infoString += ": ";
+ infoString += KviOsInfo::version();
+ infoString += "<br>";
+ infoString += __tr2qs_ctx("Architecture","about");
+ infoString += ": ";
+ infoString += KviOsInfo::machine();
+ infoString += "<br><br>";
+ infoString += "<b>";
+ infoString += __tr2qs_ctx("Build Info","about");
+ infoString += ":</b><br>";
infoString += __tr2qs_ctx("Build Date","about");
infoString += ": ";
infoString += KviBuildInfo::buildDate();
infoString += "<br>";
+ infoString += __tr2qs_ctx("Sources Date","about");
+ infoString += ": ";
+ infoString += KviBuildInfo::buildSourcesDate();
+ infoString += "<br>";
+ infoString += __tr2qs_ctx("System Name","about");
+ infoString += ": ";
+ infoString += KviBuildInfo::buildSystem();
+ infoString += "<br>";
+ infoString += __tr2qs_ctx("CPU Name","about");
+ infoString += ": ";
+ infoString += KviBuildInfo::buildCPU();
+ infoString += "<br>";
infoString += __tr2qs_ctx("Build Command","about");
- infoString += ": " KVI_BUILD_COMMAND "<br>";
+ infoString += ": ";
+ infoString += KviBuildInfo::buildCommand();
+ infoString += "<br>";
infoString += __tr2qs_ctx("Build Flags","about");
- infoString += ": " KVI_BUILD_FLAGS "<br>";
+ infoString += ": ";
+ infoString += KviBuildInfo::buildFlags();
+ infoString += "<br>";
infoString += __tr2qs_ctx("Compiler Name","about");
- infoString += ": " KVI_BUILD_COMPILER "<br>";
+ infoString += ": ";
+ infoString += KviBuildInfo::buildCompiler();
+ infoString += "<br>";
infoString += __tr2qs_ctx("Compiler Flags","about");
- infoString += ": " KVI_BUILD_COMPILER_FLAGS;
+ infoString += ": ";
+ infoString += KviBuildInfo::buildCompilerFlags();
#endif
v->setText(infoString);