Re: [Qt-creator] Generating .qmltypes files

2018-04-16 Thread Narolewski Jakub
As they usually say, if it isn't DNS it's probably encoding :p

I work under Windows and to generate .qmltypes I have used powershell and
operator '>' to redirect output to file.

When I opened the file in notepad++ I saw that it has 'UCS-2 LE BOM' as its
encoding.

When I manually resaved it as UTF-8 Creator stopped giving me errors and
syntax highlighting started to work :]

Thank you for your help,
Jakub Narolewski

On Mon, 16 Apr 2018, 14:21 Thomas Hartmann,  wrote:

> Hi,
>
>
> try qmlplugindump -nonrelocatable  IzLibrary 1.0
> ./IzLibrary/izlibrary.qmltypes.
>
> The -nonrelocatable is at least required for the qmltypes to properly
> work.
>
>
> But the parsing error you get seems weird since the file should be
> syntactically correct in any case.
>
>
> Kind Regards,
>
> Thomas Hartmann
> --
> *From:* Qt-creator  qt...@qt-project.org> on behalf of Jakub Narolewski 
> *Sent:* Monday, April 16, 2018 2:14:24 PM
> *To:* qt-creator@qt-project.org
> *Subject:* [Qt-creator] Generating .qmltypes files
>
> Hello,
>
> I recently wanted to generate .qmltypes files for my QML plugins to get
> syntax suggestions for them but got stuck on Creator's error.
> I have a plugin named IzLibrary. It resides in its import folder -
> "IzLibrary". In it I have:
>
> 1. qmldir file
> 2. IzLibraryPlugin.dll file
> 3. [hopefully] properly generated izlibrary.qmltypes file
>
> Contents of the qmldir are:
> // file start
> module IzLibrary
> plugin IzLibraryPlugin
> typeinfo izlibrary.qmltypes
> classname IzQMLComponents
> IzToast 1.0 qrc:///src/JS/IzToast.js
> IzMark 1.0 qrc:///src/JS/IzMark.js
> IzBusy 1.0 qrc:///src/JS/IzBusy.js
> // file end
>
> To generate izlibrary.qmltypes file I used:
> qmlplugindump IzLibrary 1.0 ./ > ./IzLibrary/izlibrary.qmltypes
>
> // file start
> This command generates, what I think is, a proper .qmltypes file:
> import QtQuick.tooling 1.2
>
> // This file describes the plugin-supplied types contained in the library.
> // It is used for QML tooling purposes only.
> //
> // This file was auto-generated by:
> // 'qmlplugindump IzLibrary 1.0 ./'
>
> Module {
> dependencies: []
> Component {
> name: "QDoubleValidator"
> prototype: "QValidator"
> exports: ["IzDoubleValidator 1.0"]
> exportMetaObjectRevisions: [0]
>
> [~here be 4000 more lines of similar stuff~]
>
> }
> }
> // file end
>
> But under QtCreator 4.6, in General Messages tab, I get:
> Warnings while parsing QML type information of
> C:/Users/jakubn/Documents/projekty/qt-projects/deploy/plugins/release/5.9.4/msvc/x86/IzLibrary:
> Failed to parse
> "C:/Users/jakubn/Documents/projekty/qt-projects/deploy/plugins/release/5.9.4/msvc/x86/IzLibrary/izlibrary.qmltypes".
> Error: 1:1: Expected token "numeric literal".
> QML module does not contain information about components contained in
> plugins.
>
> Is there something I did wrong? I have a feeling I missed something really
> trivial.
>
> Jakub Narolewski
>
>
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Generating .qmltypes files

2018-04-16 Thread Thomas Hartmann
Hi,


try qmlplugindump -nonrelocatable  IzLibrary 1.0 ./IzLibrary/izlibrary.qmltypes.

The -nonrelocatable is at least required for the qmltypes to properly work.


But the parsing error you get seems weird since the file should be 
syntactically correct in any case.


Kind Regards,

Thomas Hartmann


From: Qt-creator  on 
behalf of Jakub Narolewski 
Sent: Monday, April 16, 2018 2:14:24 PM
To: qt-creator@qt-project.org
Subject: [Qt-creator] Generating .qmltypes files

Hello,

I recently wanted to generate .qmltypes files for my QML plugins to get syntax 
suggestions for them but got stuck on Creator's error.
I have a plugin named IzLibrary. It resides in its import folder - "IzLibrary". 
In it I have:

1. qmldir file
2. IzLibraryPlugin.dll file
3. [hopefully] properly generated izlibrary.qmltypes file

Contents of the qmldir are:
// file start
module IzLibrary
plugin IzLibraryPlugin
typeinfo izlibrary.qmltypes
classname IzQMLComponents
IzToast 1.0 qrc:///src/JS/IzToast.js
IzMark 1.0 qrc:///src/JS/IzMark.js
IzBusy 1.0 qrc:///src/JS/IzBusy.js
// file end

To generate izlibrary.qmltypes file I used:
qmlplugindump IzLibrary 1.0 ./ > ./IzLibrary/izlibrary.qmltypes

// file start
This command generates, what I think is, a proper .qmltypes file:
import QtQuick.tooling 1.2

// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
// 'qmlplugindump IzLibrary 1.0 ./'

Module {
dependencies: []
Component {
name: "QDoubleValidator"
prototype: "QValidator"
exports: ["IzDoubleValidator 1.0"]
exportMetaObjectRevisions: [0]

[~here be 4000 more lines of similar stuff~]

}
}
// file end

But under QtCreator 4.6, in General Messages tab, I get:
Warnings while parsing QML type information of 
C:/Users/jakubn/Documents/projekty/qt-projects/deploy/plugins/release/5.9.4/msvc/x86/IzLibrary:
Failed to parse 
"C:/Users/jakubn/Documents/projekty/qt-projects/deploy/plugins/release/5.9.4/msvc/x86/IzLibrary/izlibrary.qmltypes".
Error: 1:1: Expected token "numeric literal".
QML module does not contain information about components contained in plugins.

Is there something I did wrong? I have a feeling I missed something really 
trivial.

Jakub Narolewski

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] Generating .qmltypes files

2018-04-16 Thread Jakub Narolewski
Hello,

I recently wanted to generate .qmltypes files for my QML plugins to get syntax 
suggestions for them but got stuck on Creator's error.
I have a plugin named IzLibrary. It resides in its import folder - "IzLibrary". 
In it I have:

1. qmldir file
2. IzLibraryPlugin.dll file
3. [hopefully] properly generated izlibrary.qmltypes file

Contents of the qmldir are:
// file start
module IzLibrary
plugin IzLibraryPlugin
typeinfo izlibrary.qmltypes
classname IzQMLComponents
IzToast 1.0 qrc:///src/JS/IzToast.js
IzMark 1.0 qrc:///src/JS/IzMark.js
IzBusy 1.0 qrc:///src/JS/IzBusy.js
// file end

To generate izlibrary.qmltypes file I used:
qmlplugindump IzLibrary 1.0 ./ > ./IzLibrary/izlibrary.qmltypes

// file start
This command generates, what I think is, a proper .qmltypes file:
import QtQuick.tooling 1.2

// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
// 'qmlplugindump IzLibrary 1.0 ./'

Module {
dependencies: []
Component {
name: "QDoubleValidator"
prototype: "QValidator"
exports: ["IzDoubleValidator 1.0"]
exportMetaObjectRevisions: [0]

[~here be 4000 more lines of similar stuff~]

}
}
// file end

But under QtCreator 4.6, in General Messages tab, I get:
Warnings while parsing QML type information of 
C:/Users/jakubn/Documents/projekty/qt-projects/deploy/plugins/release/5.9.4/msvc/x86/IzLibrary:
Failed to parse 
"C:/Users/jakubn/Documents/projekty/qt-projects/deploy/plugins/release/5.9.4/msvc/x86/IzLibrary/izlibrary.qmltypes".
Error: 1:1: Expected token "numeric literal".
QML module does not contain information about components contained in plugins.

Is there something I did wrong? I have a feeling I missed something really 
trivial.

Jakub Narolewski

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator