K4AboutData
Stephen Kelly
steveire at gmail.com
Tue Nov 26 08:56:54 UTC 2013
Stephen Kelly wrote:
>> Conclusion:
>> I think it's a lot simpler to keep things as is,
>
> I can't say I understand fully, but thanks for looking into it!
I looked into this to try to understand, but I still don't understand why a
patch something like this can not be applied:
index 9c5cf89..75be94e 100644
--- a/tier4/kde4support/src/kdecore/kcmdlineargs.cpp
+++ b/tier4/kde4support/src/kdecore/kcmdlineargs.cpp
@@ -41,6 +41,7 @@
#include <QtCore/QUrl>
#include "k4aboutdata.h"
+#include "kaboutdata.h"
//
-----------------------------------------------------------------------------
// Design notes:
@@ -469,6 +470,18 @@ KCmdLineArgs::init(int _argc, char **_argv, const
K4AboutData *_about, StdCmdLin
addStdCmdLineOptions(stdargs);
}
+void
+KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about,
StdCmdLineArgs stdargs)
+{
+ init(_argc, _argv,
+ new K4AboutData(_about->componentName().toLatin1(),
+ _about->catalogName().toLatin1(),
+ ki18n(_about->componentName().toLatin1()),
+ _about->version().toLatin1(),
+ ki18n(_about->shortDescription().toLatin1())),
+ stdargs);
+}
+
QString KCmdLineArgs::cwd()
{
return QString::fromLocal8Bit(staticObj()->mCwd.data());
diff --git a/tier4/kde4support/src/kdecore/kcmdlineargs.h
b/tier4/kde4support/src/kdecore/kcmdlineargs.h
index 10228cc..fa1896f 100644
--- a/tier4/kde4support/src/kdecore/kcmdlineargs.h
+++ b/tier4/kde4support/src/kdecore/kcmdlineargs.h
@@ -140,6 +140,7 @@ class KDE4SUPPORT_DEPRECATED_EXPORT_NOISE
KCmdLineOptions
class KCmdLineArgsList;
class KApplication;
class K4AboutData;
+class KAboutData;
/**
* @short A class for command-line argument handling.
@@ -339,6 +340,10 @@ public:
char **_argv,
const K4AboutData *about,
StdCmdLineArgs stdargs=StdCmdLineArgs(CmdLineArgQt|
CmdLineArgKDE));
+ static void init(int _argc,
+ char **_argv,
+ const KAboutData *about,
+ StdCmdLineArgs stdargs=StdCmdLineArgs(CmdLineArgQt|
CmdLineArgKDE));
/**
* Initialize Class
Can you explain?
Thanks,
Steve.
More information about the Kde-frameworks-devel
mailing list