aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Szymon Tomasz Stefanek2008-04-20 12:58:16 +0000
committerGravatar Szymon Tomasz Stefanek2008-04-20 12:58:16 +0000
commit5b47dbe81aa65d6737839861d30a73a2eb81a791 (patch)
tree830a3438d2937e230cd2d60a92db60f1d449a98c /src
parentremoved some compilation warnigs & added some debug info in doc generation (diff)
downloadKVIrc-5b47dbe81aa65d6737839861d30a73a2eb81a791.tar.gz
KVIrc-5b47dbe81aa65d6737839861d30a73a2eb81a791.tar.bz2
KVIrc-5b47dbe81aa65d6737839861d30a73a2eb81a791.zip
More work on the build flags and a small aesthetic fix on the objects module
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1530 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
-rw-r--r--src/kvilib/CMakeLists.txt230
-rw-r--r--src/kvilib/config/kvi_buildinfo.cpp15
-rw-r--r--src/kvilib/config/kvi_buildinfo.h52
-rw-r--r--src/kvilib/config/kvi_settings.h17
-rw-r--r--src/kvilib/config/kvi_wincfg.h7
-rw-r--r--src/modules/objects/class_widget.cpp2
6 files changed, 176 insertions, 147 deletions
diff --git a/src/kvilib/CMakeLists.txt b/src/kvilib/CMakeLists.txt
index 896cca4b5..542aadd5c 100644
--- a/src/kvilib/CMakeLists.txt
+++ b/src/kvilib/CMakeLists.txt
@@ -12,6 +12,73 @@ INCLUDE_DIRECTORIES(
)
SET(kvilib_MOC_HDRS
+ config/kvi_buildinfo.h
+ config/kvi_confignames.h
+ config/kvi_debug.h
+ config/kvi_defaults.h
+ config/kvi_fileextensions.h
+ config/kvi_settings.h
+ config/kvi_sourcesdate.h
+ config/kvi_version.h
+ config/kvi_wincfg.h
+ core/kvi_bswap.h
+ core/kvi_error.h
+ core/kvi_heapobject.h
+ core/kvi_inttypes.h
+ core/kvi_malloc.h
+ core/kvi_memmove.h
+ core/kvi_qcstring.h
+ core/kvi_qstring.h
+ core/kvi_strasm.h
+ core/kvi_string.h
+ core/kvi_stringarray.h
+ ext/kvi_accel.h
+ ext/kvi_cmdformatter.h
+ ext/kvi_config.h
+ ext/kvi_crypt.h
+ ext/kvi_databuffer.h
+ ext/kvi_dcophelper.h
+ ext/kvi_doublebuffer.h
+ ext/kvi_draganddrop.h
+ ext/kvi_garbage.h
+ ext/kvi_md5.h
+ ext/kvi_mediatype.h
+ ext/kvi_miscutils.h
+ ext/kvi_msgtype.h
+ ext/kvi_osinfo.h
+ ext/kvi_pixmap.h
+ ext/kvi_proxydb.h
+ ext/kvi_regchan.h
+ ext/kvi_regusersdb.h
+ ext/kvi_sharedfiles.h
+ ext/kvi_stringconversion.h
+ ext/kvi_xlib.h
+ file/kvi_file.h
+ file/kvi_fileutils.h
+ file/kvi_packagefile.h
+ irc/kvi_avatar.h
+ irc/kvi_avatarcache.h
+ irc/kvi_ircmask.h
+ irc/kvi_ircserver.h
+ irc/kvi_ircserverdb.h
+ irc/kvi_ircuserdb.h
+ irc/kvi_mirccntrl.h
+ irc/kvi_nickserv.h
+ irc/kvi_useridentity.h
+ net/kvi_dns.h
+ net/kvi_http.h
+ net/kvi_netutils.h
+ net/kvi_socket.h
+ net/kvi_sockettype.h
+ net/kvi_ssl.h
+ net/kvi_url.h
+ system/kvi_byteorder.h
+ system/kvi_env.h
+ system/kvi_locale.h
+ system/kvi_process.h
+ system/kvi_stdarg.h
+ system/kvi_thread.h
+ system/kvi_time.h
tal/kvi_tal_application_qt.h
tal/kvi_tal_menubar_qt.h
tal/kvi_tal_popupmenu.h
@@ -35,76 +102,57 @@ SET(kvilib_MOC_HDRS
tal/kvi_tal_widgetstack.h
tal/kvi_tal_windowstate.h
tal/kvi_tal_wizard.h
- system/kvi_byteorder.h
- system/kvi_env.h
- system/kvi_locale.h
- system/kvi_process.h
- system/kvi_stdarg.h
- system/kvi_thread.h
- system/kvi_time.h
- net/kvi_dns.h
- net/kvi_http.h
- net/kvi_netutils.h
- net/kvi_socket.h
- net/kvi_sockettype.h
- net/kvi_ssl.h
- net/kvi_url.h
- irc/kvi_avatar.h
- irc/kvi_avatarcache.h
- irc/kvi_ircmask.h
- irc/kvi_ircserver.h
- irc/kvi_ircserverdb.h
- irc/kvi_ircuserdb.h
- irc/kvi_mirccntrl.h
- irc/kvi_nickserv.h
- irc/kvi_useridentity.h
- file/kvi_file.h
- file/kvi_fileutils.h
- file/kvi_packagefile.h
- ext/kvi_accel.h
- ext/kvi_cmdformatter.h
- ext/kvi_config.h
- ext/kvi_crypt.h
- ext/kvi_databuffer.h
- ext/kvi_dcophelper.h
- ext/kvi_doublebuffer.h
- ext/kvi_draganddrop.h
- ext/kvi_garbage.h
- ext/kvi_md5.h
- ext/kvi_mediatype.h
- ext/kvi_miscutils.h
- ext/kvi_msgtype.h
- ext/kvi_osinfo.h
- ext/kvi_pixmap.h
- ext/kvi_proxydb.h
- ext/kvi_regchan.h
- ext/kvi_regusersdb.h
- ext/kvi_sharedfiles.h
- ext/kvi_stringconversion.h
- ext/kvi_xlib.h
- core/kvi_bswap.h
- core/kvi_error.h
- core/kvi_heapobject.h
- core/kvi_inttypes.h
- core/kvi_malloc.h
- core/kvi_memmove.h
- core/kvi_qcstring.h
- core/kvi_qstring.h
- core/kvi_strasm.h
- core/kvi_string.h
- core/kvi_stringarray.h
- config/kvi_buildinfo.h
- config/kvi_confignames.h
- config/kvi_debug.h
- config/kvi_defaults.h
- config/kvi_fileextensions.h
- config/kvi_settings.h
- config/kvi_sourcesdate.h
- config/kvi_version.h
- config/kvi_wincfg.h
)
SET(kvilib_SRCS
+ config/kvi_buildinfo.cpp
+ core/kvi_error.cpp
+ core/kvi_heapobject.cpp
+ core/kvi_malloc.cpp
+ core/kvi_memmove.cpp
+ core/kvi_qstring.cpp
+ core/kvi_string.cpp
+ core/kvi_stringarray.cpp
+ ext/kvi_cmdformatter.cpp
+ ext/kvi_config.cpp
+ ext/kvi_crypt.cpp
+ ext/kvi_databuffer.cpp
+ ext/kvi_dcophelper.cpp
+ ext/kvi_doublebuffer.cpp
+ ext/kvi_garbage.cpp
+ ext/kvi_md5.cpp
+ ext/kvi_mediatype.cpp
+ ext/kvi_miscutils.cpp
+ ext/kvi_msgtype.cpp
+ ext/kvi_osinfo.cpp
+ ext/kvi_pixmap.cpp
+ ext/kvi_proxydb.cpp
+ ext/kvi_regchan.cpp
+ ext/kvi_regusersdb.cpp
+ ext/kvi_sharedfiles.cpp
+ ext/kvi_stringconversion.cpp
+ file/kvi_file.cpp
+ file/kvi_fileutils.cpp
+ file/kvi_packagefile.cpp
+ irc/kvi_avatar.cpp
+ irc/kvi_avatarcache.cpp
+ irc/kvi_ircmask.cpp
+ irc/kvi_ircserver.cpp
+ irc/kvi_ircserverdb.cpp
+ irc/kvi_ircuserdb.cpp
+ irc/kvi_mirccntrl.cpp
+ irc/kvi_nickserv.cpp
+ irc/kvi_useridentity.cpp
+ net/kvi_dns.cpp
+ net/kvi_http.cpp
+ net/kvi_netutils.cpp
+ net/kvi_socket.cpp
+ net/kvi_ssl.cpp
+ net/kvi_url.cpp
+ system/kvi_env.cpp
+ system/kvi_locale.cpp
+ system/kvi_thread.cpp
+ system/kvi_time.cpp
tal/kvi_tal_application.cpp
tal/kvi_tal_filedialog.cpp
tal/kvi_tal_grid.cpp
@@ -124,54 +172,6 @@ SET(kvilib_SRCS
tal/kvi_tal_vbox.cpp
tal/kvi_tal_widgetstack.cpp
tal/kvi_tal_wizard.cpp
- system/kvi_env.cpp
- system/kvi_locale.cpp
- system/kvi_thread.cpp
- system/kvi_time.cpp
- net/kvi_dns.cpp
- net/kvi_http.cpp
- net/kvi_netutils.cpp
- net/kvi_socket.cpp
- net/kvi_ssl.cpp
- net/kvi_url.cpp
- irc/kvi_avatar.cpp
- irc/kvi_avatarcache.cpp
- irc/kvi_ircmask.cpp
- irc/kvi_ircserver.cpp
- irc/kvi_ircserverdb.cpp
- irc/kvi_ircuserdb.cpp
- irc/kvi_mirccntrl.cpp
- irc/kvi_nickserv.cpp
- irc/kvi_useridentity.cpp
- file/kvi_file.cpp
- file/kvi_fileutils.cpp
- file/kvi_packagefile.cpp
- ext/kvi_cmdformatter.cpp
- ext/kvi_config.cpp
- ext/kvi_crypt.cpp
- ext/kvi_databuffer.cpp
- ext/kvi_dcophelper.cpp
- ext/kvi_doublebuffer.cpp
- ext/kvi_garbage.cpp
- ext/kvi_md5.cpp
- ext/kvi_mediatype.cpp
- ext/kvi_miscutils.cpp
- ext/kvi_msgtype.cpp
- ext/kvi_osinfo.cpp
- ext/kvi_pixmap.cpp
- ext/kvi_proxydb.cpp
- ext/kvi_regchan.cpp
- ext/kvi_regusersdb.cpp
- ext/kvi_sharedfiles.cpp
- ext/kvi_stringconversion.cpp
- core/kvi_error.cpp
- core/kvi_heapobject.cpp
- core/kvi_malloc.cpp
- core/kvi_memmove.cpp
- core/kvi_qstring.cpp
- core/kvi_string.cpp
- core/kvi_stringarray.cpp
- config/kvi_buildinfo.cpp
)
# After this call, files will be moc'ed to moc_kvi_*.cpp
diff --git a/src/kvilib/config/kvi_buildinfo.cpp b/src/kvilib/config/kvi_buildinfo.cpp
index 95676d045..57de5a81d 100644
--- a/src/kvilib/config/kvi_buildinfo.cpp
+++ b/src/kvilib/config/kvi_buildinfo.cpp
@@ -23,7 +23,10 @@
//
//=============================================================================
+#define __KVILIB__
+
#include "kvi_buildinfo.h"
+#include "kvi_sourcesdate.h"
#if defined(_OS_WIN32_) || defined(Q_OS_WIN32) || defined(Q_OS_WIN32_)
#include "kvi_wincfg.h"
@@ -45,31 +48,31 @@ namespace KviBuildInfo
QString buildCommand()
{
- return QString(KVI_BUILD_COMMAND);
+ return QString(KVIRC_BUILD_COMMAND);
}
QString buildFlags()
{
- return QString(KVI_BUILD_FLAGS);
+ return QString(KVIRC_BUILD_FLAGS);
}
QString buildSystem()
{
- return QString(KVI_BUILD_SYSTEM);
+ return QString(KVIRC_BUILD_SYSTEM);
}
QString buildCPU()
{
- return QString(KVI_BUILD_CPU);
+ return QString(KVIRC_BUILD_CPU);
}
QString buildCompiler()
{
- return QString(KVI_BUILD_COMPILER);
+ return QString(KVIRC_BUILD_COMPILER);
}
QString buildCompilerFlags()
{
- return QString(KVI_BUILD_COMPILER_FLAGS);
+ return QString(KVIRC_BUILD_COMPILER_FLAGS);
}
};
diff --git a/src/kvilib/config/kvi_buildinfo.h b/src/kvilib/config/kvi_buildinfo.h
index b9dfc26d6..bfe86105e 100644
--- a/src/kvilib/config/kvi_buildinfo.h
+++ b/src/kvilib/config/kvi_buildinfo.h
@@ -30,16 +30,52 @@
#include <QString>
+///
+/// This namespace contains informations gathered at kvirc build time.
+/// This, in fact, is the last time that "cmake" ran and successfully generated the
+/// kvilib Makefile. Since kvilib is generally built with the kvirc
+/// executable, then you can assume that the information returned
+/// from this namespace strictly applies also to kvirc.
+///
namespace KviBuildInfo
{
- QString buildDate();
- QString buildSourcesDate();
- QString buildCommand();
- QString buildFlags();
- QString buildSystem();
- QString buildCPU();
- QString buildCompiler();
- QString buildCompilerFlags();
+ ///
+ /// Retrieve the latest kvilib/kvirc build date.
+ ///
+ extern KVILIB_API QString buildDate();
+ ///
+ /// Returns the date tag applied to the currently compiled SVN sources.
+ ///
+ extern KVILIB_API QString buildSourcesDate();
+ ///
+ /// Returns the build command used by cmake to create the current kvirc executable.
+ ///
+ extern KVILIB_API QString buildCommand();
+ ///
+ /// Returns some of the build flags that were worked out by cmake at
+ /// compilation time.
+ ///
+ extern KVILIB_API QString buildFlags();
+ ///
+ /// Returns a description of the system that the currently running
+ /// executable was built on.
+ ///
+ extern KVILIB_API QString buildSystem();
+ ///
+ /// Returns a description of the CPU that the currently running
+ /// executable was built on.
+ ///
+ extern KVILIB_API QString buildCPU();
+ ///
+ /// Returns a description of the compiler that the currently running
+ /// executable was built with.
+ ///
+ extern KVILIB_API QString buildCompiler();
+ ///
+ /// Returns a description of the compiler flags that the currently running
+ /// executable was built with.
+ ///
+ extern KVILIB_API QString buildCompilerFlags();
};
#endif //!_KVI_BUILDINFO_H_
diff --git a/src/kvilib/config/kvi_settings.h b/src/kvilib/config/kvi_settings.h
index ed8e4dc82..b72c54541 100644
--- a/src/kvilib/config/kvi_settings.h
+++ b/src/kvilib/config/kvi_settings.h
@@ -78,10 +78,6 @@
#ifndef VERSION
#define VERSION "?.?.?"
#endif
-
- #ifndef BUILD_FLAGS
- #define BUILD_FLAGS "?"
- #endif
#else
// assume CMake build system
@@ -89,12 +85,6 @@
#define VERSION KVIRC_VERSION_RELEASE
#define VERSION_BRANCH KVIRC_VERSION_BRANCH
- #define BUILD_COMMAND KVIRC_BUILD_COMMAND
- #define BUILD_FLAGS KVIRC_BUILD_FLAGS
- #define BUILD_SYSTEM KVIRC_BUILD_SYSTEM
- #define BUILD_CPU KVIRC_BUILD_CPU
- #define BUILD_COMPILER KVIRC_BUILD_COMPILER
- #define BUILD_COMPILER_FLAGS KVIRC_BUILD_COMPILER_FLAGS
#endif
#endif
@@ -110,12 +100,7 @@
#define KVI_VERSION VERSION
#define KVI_VERSION_BRANCH VERSION_BRANCH
-#define KVI_BUILD_COMMAND BUILD_COMMAND
-#define KVI_BUILD_FLAGS BUILD_FLAGS
-#define KVI_BUILD_SYSTEM BUILD_SYSTEM
-#define KVI_BUILD_CPU BUILD_CPU
-#define KVI_BUILD_COMPILER BUILD_COMPILER
-#define KVI_BUILD_COMPILER_FLAGS BUILD_COMPILER_FLAGS
+
#define KVI_RELEASE_NAME "Insomnia"
diff --git a/src/kvilib/config/kvi_wincfg.h b/src/kvilib/config/kvi_wincfg.h
index d7c436679..e42d3a07b 100644
--- a/src/kvilib/config/kvi_wincfg.h
+++ b/src/kvilib/config/kvi_wincfg.h
@@ -94,7 +94,12 @@
#define KVIRC_BUILD_DATE __DATE__" "__TIME__
/* these are the build flags */
-#define BUILD_FLAGS "win32"
+#define KVIRC_BUILD_FLAGS "win32"
+#define KVIRC_BUILD_COMMAND "win32"
+#define KVIRC_BUILD_SYSTEM "win32"
+#define KVIRC_BUILD_CPU "win32"
+#define KVIRC_BUILD_COMPILER "win32"
+#define KVIRC_BUILD_COMPILER_FLAGS "win32"
/* define if you have strings.h */
/* #undef HAVE_STRINGS_H */
diff --git a/src/modules/objects/class_widget.cpp b/src/modules/objects/class_widget.cpp
index 438000583..07048ce78 100644
--- a/src/modules/objects/class_widget.cpp
+++ b/src/modules/objects/class_widget.cpp
@@ -1778,7 +1778,7 @@ bool KviKvsObject_widget::function_setWindowIcon(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
QPixmap * pix = g_pIconManager->getImage(icon);
- if(pix)widget()->setWindowIcon((QIcon)*pix);
+ if(pix)widget()->setWindowIcon(QIcon(*pix));
return true;
}