mocking kcontrol infrastructure for quick kontrol module test

Andriy Rysin arysin at gmail.com
Sun Aug 27 17:45:40 BST 2006


Some time ago I was able to test kcmlayout module quickly without all the
KCM infrastructure by creating a simple main.cpp file and linking it to the
module files.
The source was as simple as this:

...
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QWidget window;

      KInstance* inst = new KInstance("kcmlayout");
      new LayoutConfig(inst, &window);

     window.show();
    return app.exec();
}


Can somebody tell me how that could be done with new KGenericFactory
approach?
 If I just change to LayoutConfig(window, emptyStringList) it asserts in
kcmodule.cpp

Thanks,
Andriy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060827/500bdae8/attachment.htm>


More information about the kde-core-devel mailing list