[patch] QHttp and QFtp forbidden in KDE

Thiago Macieira thiago at kde.org
Fri Aug 29 13:18:06 BST 2008


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080829/586a877f/attachment.sig>


More information about the kde-core-devel mailing list