Project

General

Profile

Bug #679

difficulties testing filedownloader

Added by Anonymous over 5 years ago. Updated over 2 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 .

History

#1 Updated by Alexis Jeandet over 5 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);
}

#2 Updated by Anonymous about 5 years ago

Fixed

#3 Updated by Anonymous about 5 years ago

  • Status changed from New to Resolved

#4 Updated by Nicolas Aunai almost 4 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Nicolas Aunai

#5 Updated by Nicolas Aunai over 2 years ago

  • Category set to legacy

Also available in: Atom PDF