Project

General

Profile

Actions

Bug #679

closed

difficulties testing filedownloader

Added by Anonymous about 8 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
legacy
Target version:
-
Start date:
31/03/2016
Due date:
% Done:

0%

Estimated time:
revision:
r0
blocked:
No
Sprint:

Description

While attempting to test DownloadFile() from FileDownloader, I get the following error message :
QScriptEngine: Must construct a Q(Core)Application before a QScriptEngine

It seems that ProxyPacParser (called by QLopNetworkProxyFactory) create a QScriptEngine that need a QCoreApplication to be working.
Unfortunately, the Test API doesn't provide it .

Actions #1

Updated by Alexis Jeandet about 8 years ago

QTEST_MAIN doesn't build a QCoreApplication, that's normal. If you need one then build one:

int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
YOURTESTCLASS instance;
QTest::qExec(&instance, argc, argv);
}

Actions #2

Updated by Anonymous almost 8 years ago

Fixed

Actions #3

Updated by Anonymous almost 8 years ago

  • Status changed from New to Resolved
Actions #4

Updated by Nicolas Aunai over 6 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Nicolas Aunai
Actions #5

Updated by Nicolas Aunai about 5 years ago

  • Category set to legacy
Actions

Also available in: Atom PDF