On Sexta 29 Agosto 2008 13:23:52 Rafael Fernández López wrote: > Hi Thiago and all, > > Just a probably stupid question. Can you just do on QHttp and QFtp code > something like: > > Q_ASSERT_X(!qobject_cast<KApplication*>(qApp()), "Whatever", "You shouldn't > use this code in KDE code, use KIO instead"); > > I think this would fix the problem when Marble is Qt-only based.
No. Reasons: 1) To use qobject_cast<KApplication*>, we need to link to libkdeui. Which we can't. 2) It's not Qt's place to determine what's good for KDE. But it is KDE's place to determine what's good for KDE. 3) Qt-only applications shouldn't be doing requires(KDE4) 4) The decision is a compile-time one, not run-time. That is, non-KDE code that may get loaded into a KDE application is allowed to use QHttp. But KDE code loaded into a Qt-only application shouldn't be using QHttp. Examples are styles, like Oxygen. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel