[Kde-bindings] [Bug 232645] New: findMethod() does not work for methods in QGlobalSpace
Chris Burel
chrisburel at gmail.com
Tue Mar 30 01:55:07 UTC 2010
https://bugs.kde.org/show_bug.cgi?id=232645
Summary: findMethod() does not work for methods in QGlobalSpace
Product: bindings
Version: unspecified
Platform: Compiled Sources
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kde-bindings at kde.org
ReportedBy: chrisburel at gmail.com
Version: (using Devel)
Compiler: gcc 4.3.2
OS: Linux
Installed from: Compiled sources
It appears at first glance that the smoke findMethod() function should find a
method regardless of which smoke object that method is defined in. For
instance, qt_Smoke can find the method MessageBox::enableAllMessages, even
though it is defined in kdeui_Smoke. This isn't the case for methods defined
in QGlobalSpace, because that "class" is marked as being internal to each of
qt_Smoke, kdecore_Smoke, and kdeui_Smoke, among others. This makes it rather
difficult to find methods defined in the QGlobalSpace namespace, because you
have to know which Smoke object to use before you do the lookup.
I wrote this small program to illustrate the problem:
#include "smoke.h"
#include "qt_smoke.h"
#include "kdecore_smoke.h"
#include "kdeui_smoke.h"
int main() {
init_qt_Smoke();
init_kdecore_Smoke();
init_kdeui_Smoke();
Smoke::ModuleIndex method1 = qt_Smoke->findMethod( "QGlobalSpace", "ki18n$"
);
Smoke::ModuleIndex method2 = kdecore_Smoke->findMethod( "QGlobalSpace",
"ki18n$" );
Smoke::ModuleIndex method3 = kdeui_Smoke->findMethod( "QGlobalSpace",
"ki18n$" );
Smoke::ModuleIndex method4 = qt_Smoke->findMethod( "KMessageBox",
"enableAllMessages" );
Smoke::ModuleIndex method5 = kdecore_Smoke->findMethod( "KMessageBox",
"enableAllMessages" );
Smoke::ModuleIndex method6 = kdeui_Smoke->findMethod( "KMessageBox",
"enableAllMessages" );
if( ( method1 == method2 ) &&
( method2 == method3 ) &&
( method3 == method1 ) ) {
printf( "QGlobalSpace::ki18n$ found from all smoke objects\n"
);
}
else {
printf( "QGlobalSpace::ki18n$ NOT found from all smoke
objects\n" );
}
if( ( method4 == method5 ) &&
( method5 == method6 ) &&
( method6 == method4 ) ) {
printf( "KMessageBox::enableAllMessages found from all smoke objects\n"
);
}
else {
printf( "KMessageBox::enableAllMessages NOT found from all smoke
objects\n" );
}
}
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kde-bindings
mailing list