[Interest] Unable to run QtQuick TestCase from qrc resources
André Hartmann
andre.hartmann at iseg-hv.de
Wed Apr 25 17:14:54 CEST 2018
Hi Igor,
Am 25.04.2018 um 16:08 schrieb Igor Mironchik:
> Hi,
>
> if (path.startsWith(QLatin1String(":/")))
> view.setSource(QUrl(QLatin1String("qrc:") + path.midRef(2)));
>
>
> Bug is here... path.midRef(1) should be
>
> or
>
> QLatin1String("qrc:/")
Do you want to provide a fix? :)
André
>
>
> On 25.04.2018 16:16, Christoph Keller wrote:
>>
>> They should, at least the source of the framework sets the path to
>> ":/" on Android:
>> https://github.com/qt/qtdeclarative/blob/5.11/src/qmltest/quicktest.cpp#L422
>>
>> The same applies for the sourcePath property on all platforms:
>> https://github.com/qt/qtdeclarative/blob/5.11/src/qmltest/quicktest.cpp#L536
>>
>> My tst_TestItem.qml is loaded, but it can't find the normal QtQuick
>> Item it should test.
>>
>> Christoph
>>
>>
>> On 25.04.18 14:41, Igor Mironchik wrote:
>>>
>>> Hi,
>>>
>>>
>>> On 25.04.2018 15:19, Igor Mironchik wrote:
>>>>
>>>> Hi,
>>>>
>>>> Try qrc:/ as prefix...
>>>>
>>>
>>> Will not work too... Does qrc:/ supported by Qt Quick Test at all?
>>> Seems that no...
>>>
>>>>
>>>> On 25.04.2018 13:53, Christoph Keller wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> is there a way to run the QtQuick TestCases from qrc resources?
>>>>> Running them from the file system works as as expected but setting
>>>>> the source path to ":/" leads to the TestCase being loaded but it
>>>>> cannot find other imports (in the same directory).
>>>>>
>>>>> I've attached an example which always outputs:
>>>>>
>>>>> file::/tst_TestItem.qml:4:1: TestItem is not a type
>>>>>
>>>>> TestItem {
>>>>>
>>>>> ^
>>>>>
>>>>> Christoph
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Interest mailing list
>>>>> Interest at qt-project.org
>>>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Interest mailing list
>>> Interest at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
--
Dipl.-Ing. (FH) André Hartmann
Softwareentwicklung / Software Development
E-Mail: andre.hartmann at iseg-hv.de | Tel: +49 351 26996-43 | Fax: +49 351
26996-21
iseg Spezialelektronik GmbH - HIGH VOLTAGE. EXACTLY.
iseg-hv.de | iseg-hv.com | download.iseg-hv.com
Bautzner Landstr. 23, 01454 Radeberg / Rossendorf, Germany
Geschäftsführer / Managing directors: Dr. Frank Gleisberg, Dr. Joachim
Pöthig
Amtsgericht / Lower district court: Dresden HRB 16250
Umsatzsteuer-Id: / VAT-ID: DE812508942
News / Information
https://iseg-hv.com/en/products/control#isegControl2 isegControl2 -
Unified Control Software
https://iseg-hv.com/en/products/detail/EHS EHS FLEX - Customize and keep
the price
https://iseg-hv.com/en/products/detail/EHS EHS STACK - Perfect for GEM
Detectors
https://iseg-hv.com/files/iseg-high-voltage-power-supplies.pdf NEW!
Product catalog 2017 / 2018 released
https://iseg-hv.com/en/products/detail/NHR NHR - NIM HV-Supply with
reversible polarity
Links
https://www.linkedin.com/company/12726924 iseg on LINKEDIN | Let's stay
connected!
https://www.youtube.com/channel/UC5AL-ZgOqSim_1gYNnndyzQ iseg on YOUTUBE
| Tutorials and more ...
https://www.twitter.com/iseg_hv iseg on TWITTER | please follow!
https://iseg-hv.com/files/iseg-high-voltage-power-supplies.pdf iseg
CATALOG | download product catalog as PDF
http://download.iseg-hv.com/ iseg DOWNLOADS | manuals, software,
firmware and more...
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige
Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren
Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht
gestattet.
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient
(or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in
this e-mail is strictly forbidden.
More information about the Interest
mailing list