Skip to content

Commit

Permalink
integrated costomexecutableconfig into qtctools plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochus Keller committed Jan 9, 2019
1 parent 1f46def commit 0048538
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 36 deletions.
2 changes: 1 addition & 1 deletion qtcreator.pri
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
QTCREATOR_PRI_INCLUDED = 1

QTCREATOR_VERSION = 3.6.2
QTCREATOR_VERSION = 3.6.3
QTCREATOR_COMPAT_VERSION = 3.6.0
BINARY_ARTIFACTS_BRANCH = 3.6
QTC_VERILOG = yes
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/qtctools/QtcTools.json.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
\"Name\" : \"QtcTools\",
\"Version\" : \"3.6.1\",
\"CompatVersion\" : \"3.6.1\",
\"Version\" : \"$$QTCREATOR_VERSION\",
\"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
\"Vendor\" : \"Rochus Keller\",
\"Copyright\" : \"The Qt Company Ltd, Rochus Keller\",
\"License\" : \"LGPL\",
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/qtctools/customexecutableconfigurationwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

using namespace ProjectExplorer;

namespace QtSupport {
namespace QtcTools {
namespace Internal {

CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc, ApplyMode mode)
Expand Down Expand Up @@ -189,4 +189,4 @@ bool CustomExecutableConfigurationWidget::isValid() const
}

} // namespace Internal
} // namespace QtSupport
} // namespace QtcTools
4 changes: 2 additions & 2 deletions src/plugins/qtctools/customexecutableconfigurationwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ArgumentsAspect;
class TerminalAspect;
}

namespace QtSupport {
namespace QtcTools {
class CustomExecutableRunConfiguration;

namespace Internal {
Expand Down Expand Up @@ -89,6 +89,6 @@ private slots:
};

} // namespace Internal
} // namespace QtSupport
} // namespace QtcTools

#endif // CUSTOMEXECUTABLECONFIGURATIONWIDGET_H
7 changes: 4 additions & 3 deletions src/plugins/qtctools/customexecutablerunconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "customexecutablerunconfiguration.h"
#include "customexecutableconfigurationwidget.h"
#include "qtkitinformation.h"
//#include "qtkitinformation.h"

#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/localenvironmentaspect.h>
Expand All @@ -49,11 +49,12 @@
#include <QPushButton>
#include <QLabel>
#include <QVBoxLayout>
#include <QKeyEvent>

#include <QDir>

using namespace QtSupport;
using namespace QtSupport::Internal;
using namespace QtcTools;
using namespace QtcTools::Internal;
using namespace ProjectExplorer;

namespace {
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/qtctools/customexecutablerunconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@
#ifndef CUSTOMEXECUTABLERUNCONFIGURATION_H
#define CUSTOMEXECUTABLERUNCONFIGURATION_H

#include "qtsupport_global.h"
#include "qtctools_global.h"

#include <projectexplorer/localapplicationrunconfiguration.h>

#include <QVariantMap>

namespace ProjectExplorer { class Target; }

namespace QtSupport {
namespace QtcTools {
namespace Internal { class CustomExecutableConfigurationWidget; }

class CustomExecutableRunConfigurationFactory;

class QTSUPPORT_EXPORT CustomExecutableRunConfiguration : public ProjectExplorer::LocalApplicationRunConfiguration
class CustomExecutableRunConfiguration : public ProjectExplorer::LocalApplicationRunConfiguration
{
Q_OBJECT
// the configuration widget needs to setExecutable setWorkingDirectory and setCommandLineArguments
Expand Down Expand Up @@ -131,6 +131,6 @@ class CustomExecutableRunConfigurationFactory : public ProjectExplorer::IRunConf
const QVariantMap &map);
};

} // namespace QtSupport
} // namespace QtcTools

#endif // CUSTOMEXECUTABLERUNCONFIGURATION_H
8 changes: 6 additions & 2 deletions src/plugins/qtctools/qtctools.pro
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
DEFINES += QTCTOOLS_LIBRARY

SOURCES += qtctoolsplugin.cpp
SOURCES += qtctoolsplugin.cpp \
customexecutableconfigurationwidget.cpp \
customexecutablerunconfiguration.cpp

HEADERS += qtctoolsplugin.h \
qtctools_global.h \
qtctoolsconstants.h
qtctoolsconstants.h \
customexecutableconfigurationwidget.h \
customexecutablerunconfiguration.h

include(../../qtcreatorplugin.pri)

3 changes: 2 additions & 1 deletion src/plugins/qtctools/qtctools_dependencies.pri
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ QTC_LIB_DEPENDS += \
# nothing here at this time

QTC_PLUGIN_DEPENDS += \
coreplugin
coreplugin \
projectexplorer

19 changes: 3 additions & 16 deletions src/plugins/qtctools/qtctoolsplugin.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "qtctoolsplugin.h"
#include "qtctoolsconstants.h"
#include "customexecutablerunconfiguration.h"

#include <coreplugin/icore.h>
#include <coreplugin/icontext.h>
Expand Down Expand Up @@ -40,16 +41,7 @@ bool QtcToolsPlugin::initialize(const QStringList &arguments, QString *errorStri
Q_UNUSED(arguments)
Q_UNUSED(errorString)

QAction *action = new QAction(tr("QtcTools action"), this);
Core::Command *cmd = Core::ActionManager::registerAction(action, Constants::ACTION_ID,
Core::Context(Core::Constants::C_GLOBAL));
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Meta+A")));
connect(action, SIGNAL(triggered()), this, SLOT(triggerAction()));

Core::ActionContainer *menu = Core::ActionManager::createMenu(Constants::MENU_ID);
menu->menu()->setTitle(tr("QtcTools"));
menu->addAction(cmd);
Core::ActionManager::actionContainer(Core::Constants::M_TOOLS)->addMenu(menu);
addAutoReleasedObject(new QtcTools::CustomExecutableRunConfigurationFactory);

return true;
}
Expand All @@ -69,10 +61,5 @@ ExtensionSystem::IPlugin::ShutdownFlag QtcToolsPlugin::aboutToShutdown()
return SynchronousShutdown;
}

void QtcToolsPlugin::triggerAction()
{
QMessageBox::information(Core::ICore::mainWindow(),
tr("Action triggered"),
tr("This is an action from QtcTools."));
}


3 changes: 0 additions & 3 deletions src/plugins/qtctools/qtctoolsplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class QtcToolsPlugin : public ExtensionSystem::IPlugin
bool initialize(const QStringList &arguments, QString *errorString);
void extensionsInitialized();
ShutdownFlag aboutToShutdown();

private slots:
void triggerAction();
};

} // namespace Internal
Expand Down

0 comments on commit 0048538

Please sign in to comment.