Results 1 to 1 of 1

Thread: Create new plugin based on plugin GenericProjectManager (Import existing project)

  1. #1
    Join Date
    Oct 2020
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Create new plugin based on plugin GenericProjectManager (Import existing project)

    Hi all,

    I try to create a new import wizard based on this genericprojectmanager plugin with Qt5 and QtCreator 4.12.

    I naively copy pasted all code and inserted my changes.
    • Add run configuration + factory
    • Adapt makefile steps
    • Insert default values for .include and .cflag file


    My custom plugin works, but only when there is no genericprojectmanager loaded in qtcreator. I think it has to do with these factorys. That they have global impact.
    Welp, I don't need a factory, I just need some confiugration changes of the project. Currently I think by copy-pasting everything it is some overkill.

    My question is:
    Do I need these factorys? I think it makes more sense just adding a configuration config and initializing them in GenericProjectPluginPrivate.

    My approach would be getting the target and then run the constructor of the class RunConfiguration(Target* target) in the constructor of GenericProjectPluginPrivate;

    Currently I get the error of redefinition of target in this line of code:

    Qt Code:
    1. auto genericProject = qobject_cast<GenericProject *>(ProjectTree::currentProject());
    2. Target *target;
    3. GenericExecutableRunConfiguration(target);
    To copy to clipboard, switch view to plain text mode 

    As you can see, I'm not so proficient about Qt yet. It would be nice, if you could clarify some steps for me!

    Edit:
    If you know a simple example, it would help me a lot!! Thanks

    Best regards
    Fabian
    Last edited by aphlA; 27th October 2020 at 09:39.

Similar Threads

  1. QtTest with Plugin based application
    By volcano in forum Qt Programming
    Replies: 10
    Last Post: 7th April 2017, 13:46
  2. Replies: 5
    Last Post: 3rd February 2014, 21:42
  3. Replies: 1
    Last Post: 17th January 2011, 13:27
  4. how to deploy qt based application with oracle plugin
    By kaycee1 in forum Installation and Deployment
    Replies: 1
    Last Post: 28th October 2010, 18:02
  5. How to create a plugin
    By MTK358 in forum Qt Programming
    Replies: 24
    Last Post: 27th August 2010, 17:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.