Discussion:
Qt Creator plugin API question
(too old to reply)
Aleksey Kontsevich
2018-09-11 12:29:27 UTC
Permalink
Hi all,

I need to implement KitDataSource for new ConnectedCreatorPlugin which will be officially shipped with QtC distribution. This data source gather information about compilers, platforms, target platforms, debuggers, etc used by a QtC user. I've found ProjectExplorer Namespace documentation (https://doc-snapshots.qt.io/qtcreator-extending/projectexplorer.html#namespaces) with classes which contains this information however documentation is still very poor and there are very many classes so it is not quite clear which one to use, how to use and how they are connected to each other. So question is:
- how better organize these information gathering
- which classes to use
- which signals, methods
- when to gather the information: on a project open, kit setup, etc?

Gould you guide me a little on this please? Thanks!

-- 
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Eike Ziller
2018-09-12 11:20:04 UTC
Permalink
If your question is about kits, generally the KitManager provides the list of defined Kits.
Kits are composed of data generated by KitInformation classes.
A specific KitInformation class can be used to provide specific info about a kit, e.g. QtKitInformation::qtVersion(kit) returns the Qt version specified in the kit.

Br, Eike
Post by Aleksey Kontsevich
Hi all,
- how better organize these information gathering
- which classes to use
- which signals, methods
- when to gather the information: on a project open, kit setup, etc?
Gould you guide me a little on this please? Thanks!
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
***@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Aleksey Kontsevich
2018-09-12 12:27:34 UTC
Permalink
I see. What about Kits really used by user?

-- 
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Eike Ziller
If your question is about kits, generally the KitManager provides the list of defined Kits.
Kits are composed of data generated by KitInformation classes.
A specific KitInformation class can be used to provide specific info about a kit, e.g. QtKitInformation::qtVersion(kit) returns the Qt version specified in the kit.
Br, Eike
 Hi all,
 - how better organize these information gathering
 - which classes to use
 - which signals, methods
 - when to gather the information: on a project open, kit setup, etc?
 Gould you guide me a little on this please? Thanks!
 --
 Best regards,
 Aleksey
 Linked in https://www.linkedin.com/in/alekseykontsevich
 _______________________________________________
 Qt-creator mailing list
 http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Aleksey Kontsevich
2018-10-07 21:53:23 UTC
Permalink
Hi Eike,

I see there is no documentation about QtSupport namesapce or QtKitInformation?

Also it is not clear how to get other information like:
- compiler
- debugger
- target platform
- make system (qmake, qbs, cmake, etc)

Could You provide more info please? Thanks!

-- 
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Eike Ziller
If your question is about kits, generally the KitManager provides the list of defined Kits.
Kits are composed of data generated by KitInformation classes.
A specific KitInformation class can be used to provide specific info about a kit, e.g. QtKitInformation::qtVersion(kit) returns the Qt version specified in the kit.
Br, Eike
 Hi all,
 - how better organize these information gathering
 - which classes to use
 - which signals, methods
 - when to gather the information: on a project open, kit setup, etc?
 Gould you guide me a little on this please? Thanks!
 --
 Best regards,
 Aleksey
 Linked in https://www.linkedin.com/in/alekseykontsevich
 _______________________________________________
 Qt-creator mailing list
 http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Aleksey Kontsevich
2018-10-09 22:57:00 UTC
Permalink
Hi again,

Have question about QtC help system as well. I saw there was some class which emits signal when some document openned in help system with help page URI as argument: (Core::HelpManager) or something. Now can't find it. Whether it was removed or such functionality does not exist?

-- 
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Aleksey Kontsevich
Hi Eike,
I see there is no documentation about QtSupport namesapce or QtKitInformation?
- compiler
- debugger
- target platform
- make system (qmake, qbs, cmake, etc)
Could You provide more info please? Thanks!
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
 If your question is about kits, generally the KitManager provides the list of defined Kits.
 Kits are composed of data generated by KitInformation classes.
 A specific KitInformation class can be used to provide specific info about a kit, e.g. QtKitInformation::qtVersion(kit) returns the Qt version specified in the kit.
 Br, Eike
  Hi all,
  - how better organize these information gathering
  - which classes to use
  - which signals, methods
  - when to gather the information: on a project open, kit setup, etc?
  Gould you guide me a little on this please? Thanks!
  --
  Best regards,
  Aleksey
  Linked in https://www.linkedin.com/in/alekseykontsevich
  _______________________________________________
  Qt-creator mailing list
  http://lists.qt-project.org/mailman/listinfo/qt-creator
 --
 Eike Ziller
 Principal Software Engineer
 The Qt Company GmbH
 Rudower Chaussee 13
 D-12489 Berlin
 http://qt.io
 Geschäftsführer: Mika Pälsi,
 Juha Varelius, Mika Harjuaho
 Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Eike Ziller
2018-10-10 08:00:22 UTC
Permalink
Post by Aleksey Kontsevich
Hi again,
Have question about QtC help system as well. I saw there was some class which emits signal when some document openned in help system with help page URI as argument: (Core::HelpManager) or something. Now can't find it. Whether it was removed or such functionality does not exist?
That signal only existed to get the information from Core plugin to Help plugin. This has been changed to a direct call in https://codereview.qt-project.org/238543 when making Core plugin independent from QtHelp.
Post by Aleksey Kontsevich
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Aleksey Kontsevich
Hi Eike,
I see there is no documentation about QtSupport namesapce or QtKitInformation?
- compiler
- debugger
- target platform
- make system (qmake, qbs, cmake, etc)
Could You provide more info please? Thanks!
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Eike Ziller
If your question is about kits, generally the KitManager provides the list of defined Kits.
Kits are composed of data generated by KitInformation classes.
A specific KitInformation class can be used to provide specific info about a kit, e.g. QtKitInformation::qtVersion(kit) returns the Qt version specified in the kit.
Br, Eike
Post by Aleksey Kontsevich
Hi all,
- how better organize these information gathering
- which classes to use
- which signals, methods
- when to gather the information: on a project open, kit setup, etc?
Gould you guide me a little on this please? Thanks!
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
***@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Aleksey Kontsevich
2018-10-11 02:05:08 UTC
Permalink
I see. However it is not clear to me: whether I can monitor now which help URL was opened, keywords searched, etc in QtC or can not?

In src/plugins/coreplugin/helpmanager.h file you've removed

void helpRequested(const QUrl &url, Core::HelpManager::HelpViewerLocation location);

signal which allowed at least to track URLs of opened help documents.

In Qt Help classes http://doc.qt.io/qt-5/qthelp-module.html I see the possibility and signals to track opened help documents or search keywords. Not sure how to get document titles from URLs, seems Qt Help does not provide this as well?

So the only question: is it possible somehow to get QHelpEngine instance for Qt Creator to connect to above signals? I do not see QtC help plugin provides such interface to public. Use QObject::findChild()? Thanks!

-- 
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Eike Ziller
 Hi again,
 Have question about QtC help system as well. I saw there was some class which emits signal when some document openned in help system with help page URI as argument: (Core::HelpManager) or something. Now can't find it. Whether it was removed or such functionality does not exist?
That signal only existed to get the information from Core plugin to Help plugin. This has been changed to a direct call in https://codereview.qt-project.org/238543 when making Core plugin independent from QtHelp.
 --
 Best regards,
 Aleksey
 Linked in https://www.linkedin.com/in/alekseykontsevich
 Hi Eike,
 I see there is no documentation about QtSupport namesapce or QtKitInformation?
 - compiler
 - debugger
 - target platform
 - make system (qmake, qbs, cmake, etc)
 Could You provide more info please? Thanks!
 --
 Best regards,
 Aleksey
 Linked in https://www.linkedin.com/in/alekseykontsevich
  If your question is about kits, generally the KitManager provides the list of defined Kits.
  Kits are composed of data generated by KitInformation classes.
  A specific KitInformation class can be used to provide specific info about a kit, e.g. QtKitInformation::qtVersion(kit) returns the Qt version specified in the kit.
  Br, Eike
   Hi all,
   - how better organize these information gathering
   - which classes to use
   - which signals, methods
   - when to gather the information: on a project open, kit setup, etc?
   Gould you guide me a little on this please? Thanks!
   --
   Best regards,
   Aleksey
   Linked in https://www.linkedin.com/in/alekseykontsevich
   _______________________________________________
   Qt-creator mailing list
   http://lists.qt-project.org/mailman/listinfo/qt-creator
  --
  Eike Ziller
  Principal Software Engineer
  The Qt Company GmbH
  Rudower Chaussee 13
  D-12489 Berlin
  http://qt.io
  Geschäftsführer: Mika Pälsi,
  Juha Varelius, Mika Harjuaho
  Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Tino Pyssysalo
2018-10-12 12:01:27 UTC
Permalink
Hi all,

This is in fact needed in https://bugreports.qt.io/browse/QTPM-1475 to improve prioritizing tutorials and examples in Qt Creator Welcome screen. Now, we have a long list of highlighted examples in alphabetical order, but new users have no idea which one to choose. Wed like to show 3-5 most relevant examples and hide others behind some More button. To set the priorities, we need to know, which ones are the most popular and that's exactly what telemetry could provide us.
--
Tino


On 11/10/2018, 5.05, "Aleksey Kontsevich" <***@ya.ru> wrote:

I see. However it is not clear to me: whether I can monitor now which help URL was opened, keywords searched, etc in QtC or can not?

In src/plugins/coreplugin/helpmanager.h file you've removed

void helpRequested(const QUrl &url, Core::HelpManager::HelpViewerLocation location);

signal which allowed at least to track URLs of opened help documents.

In Qt Help classes http://doc.qt.io/qt-5/qthelp-module.html I see the possibility and signals to track opened help documents or search keywords. Not sure how to get document titles from URLs, seems Qt Help does not provide this as well?

So the only question: is it possible somehow to get QHelpEngine instance for Qt Creator to connect to above signals? I do not see QtC help plugin provides such interface to public. Use QObject::findChild()? Thanks!

--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Eike Ziller
Post by Aleksey Kontsevich
Hi again,
Have question about QtC help system as well. I saw there was some class which emits signal when some document openned in help system with help page URI as argument: (Core::HelpManager) or something. Now can't find it. Whether it was removed or such functionality does not exist?
That signal only existed to get the information from Core plugin to Help plugin. This has been changed to a direct call in https://codereview.qt-project.org/238543 when making Core plugin independent from QtHelp.
Post by Aleksey Kontsevich
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Aleksey Kontsevich
Hi Eike,
I see there is no documentation about QtSupport namesapce or QtKitInformation?
- compiler
- debugger
- target platform
- make system (qmake, qbs, cmake, etc)
Could You provide more info please? Thanks!
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Eike Ziller
If your question is about kits, generally the KitManager provides the list of defined Kits.
Kits are composed of data generated by KitInformation classes.
A specific KitInformation class can be used to provide specific info about a kit, e.g. QtKitInformation::qtVersion(kit) returns the Qt version specified in the kit.
Br, Eike
Post by Aleksey Kontsevich
Hi all,
- how better organize these information gathering
- which classes to use
- which signals, methods
- when to gather the information: on a project open, kit setup, etc?
Gould you guide me a little on this please? Thanks!
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Tobias Hunger
2018-10-13 08:28:57 UTC
Permalink
Hi,
Post by Tino Pyssysalo
This is in fact needed in https://bugreports.qt.io/browse/QTPM-1475 to
improve prioritizing tutorials and examples in Qt Creator Welcome screen.
Please do not post links to private bugs on public mailing lists. That is
not at all helpful.
Post by Tino Pyssysalo
Now
, we have a long list of highlighted examples in alphabetical order, but
new users have no idea which one to choose. Wed like to show 3-5 most
relevant examples and hide others behind some More button. To set the
priorities, we need to know, which ones are the most popular and that's
exactly what telemetry could provide us.
You are substituting a didactic concept with metrics: Hiding information
for new users based on metrics samples from a different group of users is
not going to help new users.

I would greatly prefer having one good introduction to Qt featured on the
welcome. A proper tutorial, idealy even with a bit of interaction that you
can follow along in creator and that also explains how to get productive
with creator and surrounding tools.

Best Regards,
Tobias
Eike Ziller
2018-10-10 07:53:53 UTC
Permalink
Post by Aleksey Kontsevich
Hi Eike,
I see there is no documentation about QtSupport namesapce or QtKitInformation?
- compiler
e.g.
ToolChainKitInformation::toolChain(kit, ProjectExplorer::Constants::CXX_LANGUAGE_ID)
Post by Aleksey Kontsevich
- debugger
DebuggerKitInformation::debugger(kit)
Post by Aleksey Kontsevich
- target platform
Possibly DeviceTypeKitInformation::deviceTypeId(kit)
Post by Aleksey Kontsevich
- make system (qmake, qbs, cmake, etc)
Possibly something like SessionManager::projects() + project->id() (which is more a type ID)
Post by Aleksey Kontsevich
Could You provide more info please? Thanks!
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
Post by Eike Ziller
If your question is about kits, generally the KitManager provides the list of defined Kits.
Kits are composed of data generated by KitInformation classes.
A specific KitInformation class can be used to provide specific info about a kit, e.g. QtKitInformation::qtVersion(kit) returns the Qt version specified in the kit.
Br, Eike
Post by Aleksey Kontsevich
Hi all,
- how better organize these information gathering
- which classes to use
- which signals, methods
- when to gather the information: on a project open, kit setup, etc?
Gould you guide me a little on this please? Thanks!
--
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
***@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Aleksey Kontsevich
2018-10-10 22:48:18 UTC
Permalink
Thanks, Eike, for the comprehensive explanation: added much more info and in more correct way than before to KitDataSource. Only 2 questions:

- I see DebuggerItem allows to get debugger version via QString version() const method, is there something similar for compiler? I see such information is absent in ToolChain class.

- ToolChain class allows to get cxxLanguageVersion() or languageVersion(), however not sure what arguments are for these methods? Also they are return enums, good to have QString() analogues - are there something available?

-- 
Best regards,
Aleksey
Linked in https://www.linkedin.com/in/alekseykontsevich
 Hi Eike,
 I see there is no documentation about QtSupport namesapce or QtKitInformation?
 - compiler
e.g.
ToolChainKitInformation::toolChain(kit, ProjectExplorer::Constants::CXX_LANGUAGE_ID)
 - debugger
DebuggerKitInformation::debugger(kit)
 - target platform
Possibly DeviceTypeKitInformation::deviceTypeId(kit)
 - make system (qmake, qbs, cmake, etc)
Possibly something like SessionManager::projects() + project->id() (which is more a type ID)
 Could You provide more info please? Thanks!
 --
 Best regards,
 Aleksey
 Linked in https://www.linkedin.com/in/alekseykontsevich
 If your question is about kits, generally the KitManager provides the list of defined Kits.
 Kits are composed of data generated by KitInformation classes.
 A specific KitInformation class can be used to provide specific info about a kit, e.g. QtKitInformation::qtVersion(kit) returns the Qt version specified in the kit.
 Br, Eike
  Hi all,
  - how better organize these information gathering
  - which classes to use
  - which signals, methods
  - when to gather the information: on a project open, kit setup, etc?
  Gould you guide me a little on this please? Thanks!
  --
  Best regards,
  Aleksey
  Linked in https://www.linkedin.com/in/alekseykontsevich
  _______________________________________________
  Qt-creator mailing list
  http://lists.qt-project.org/mailman/listinfo/qt-creator
 --
 Eike Ziller
 Principal Software Engineer
 The Qt Company GmbH
 Rudower Chaussee 13
 D-12489 Berlin
 http://qt.io
 Geschäftsführer: Mika Pälsi,
 Juha Varelius, Mika Harjuaho
 Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Loading...