[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Notes on koffice unit tests
From: Thomas Zander <zander () kde ! org>
Date: 2007-02-11 10:14:27
Message-ID: 200702111114.27742.zander () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
On Sunday 11 February 2007 03:49, Brad Hards wrote:
> On Sunday 11 February 2007 12:33, Thomas Zander wrote:
> > > 10, 36 and 38 may have something wrong with the test setup - dies in
> > > QCoreApplication. Or maybe it is in my setup?
> >
> > Its a 'bug' in qtestlib. Or I just have no clue on how to allow GUI stuff
> > in it.
> > I have not found anyone that knows more. I gave up on fixing it.
>
> I will fix this (well, workaround it).
> It does look like a qtestlib problem - if I can get it down to a simple
> example, I'll submit the bug to TT.
see attached my mail I sent long ago.
The answer was that QTEST_MAIN *is* creating a qApplication. A statement which
I doubt is true.
--
Thomas Zander
["forwarded message" (message/rfc822)]
I tried building a couple of unit tests that use qfontdatabase indirectly
by my test using QTextDocument.
I ended up with this in my initTestCase() to make it work; and obviously I
need a proper DISPLAY variable set:
void TestDocumentLayout::initTestCase() {
// To get around this error
// ASSERT failure in QFontDatabase: "A QApplication object needs to be
// constructed before FontConfig is used.", file
// text/qfontdatabase_x11.cpp, line 942
QCoreApplication::instance()->exit();
QCoreApplication::instance()->~QCoreApplication();
QApplication::setQuitOnLastWindowClosed(false);
m_app = new QApplication(0, 0, false);
}
Can I use QTestLib graphically? If not currently possible (except for this
nice hack) Can I request a feature that does the above in a nicer way?
Thanks!
--
Thomas Zander
[Attachment #10 (application/pgp-signature)]
[Attachment #11 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic