diff --git a/share/qtcreator/templates/wizards/files/qrc/file.qrc b/share/qtcreator/templates/wizards/files/qrc/file.qrc new file mode 100644 index 00000000000..807350da3bf --- /dev/null +++ b/share/qtcreator/templates/wizards/files/qrc/file.qrc @@ -0,0 +1,2 @@ + + diff --git a/share/qtcreator/templates/wizards/files/qrc/wizard.json b/share/qtcreator/templates/wizards/files/qrc/wizard.json new file mode 100644 index 00000000000..9a565515261 --- /dev/null +++ b/share/qtcreator/templates/wizards/files/qrc/wizard.json @@ -0,0 +1,37 @@ +{ + "version": 1, + "kind": "file", + "id": "F.Resource", + "category": "R.Qt", + "trDescription": "Creates a Qt Resource file (.qrc).", + "trDisplayName": "Qt Resource File", + "trDisplayCategory": "Qt", + "icon": "../../global/genericfilewizard.png", + "featuresRequired": [ "Plugin.ResourceEditor" ], + + "pages" : + [ + { + "trDisplayName": "Location", + "trShortTitle": "Location", + "typeId": "File" + }, + { + "trDisplayName": "Project Management", + "trShortTitle": "Summary", + "typeId": "Summary" + } + ], + "generators" : + [ + { + "typeId": "File", + "data": + { + "source": "file.qrc", + "target": "%{JS: Cpp.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('application/vnd.qt.xml.resource')}')}", + "openInEditor": true + } + } + ] +} diff --git a/src/plugins/resourceeditor/resourceeditor.pro b/src/plugins/resourceeditor/resourceeditor.pro index 2e66742a1c1..4a948ac274c 100644 --- a/src/plugins/resourceeditor/resourceeditor.pro +++ b/src/plugins/resourceeditor/resourceeditor.pro @@ -3,7 +3,6 @@ include(qrceditor/qrceditor.pri) HEADERS += resourceeditorfactory.h \ resourceeditorplugin.h \ -resourcewizard.h \ resourceeditorw.h \ resourceeditorconstants.h \ resource_global.h \ @@ -11,7 +10,6 @@ resourcenode.h SOURCES +=resourceeditorfactory.cpp \ resourceeditorplugin.cpp \ -resourcewizard.cpp \ resourceeditorw.cpp \ resourcenode.cpp diff --git a/src/plugins/resourceeditor/resourceeditor.qbs b/src/plugins/resourceeditor/resourceeditor.qbs index 6d7d6c72243..c7dfd114381 100644 --- a/src/plugins/resourceeditor/resourceeditor.qbs +++ b/src/plugins/resourceeditor/resourceeditor.qbs @@ -22,7 +22,6 @@ QtcPlugin { "resourceeditorfactory.cpp", "resourceeditorfactory.h", "resourceeditorplugin.cpp", "resourceeditorplugin.h", "resourceeditorw.cpp", "resourceeditorw.h", - "resourcewizard.cpp", "resourcewizard.h", "resource_global.h", "resourcenode.cpp", "resourcenode.h" ] } diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp index 3d68c80c030..22b31fe8b06 100644 --- a/src/plugins/resourceeditor/resourceeditorplugin.cpp +++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp @@ -31,7 +31,6 @@ #include "resourceeditorw.h" #include "resourceeditorconstants.h" -#include "resourcewizard.h" #include "resourceeditorfactory.h" #include "resourcenode.h" @@ -128,15 +127,6 @@ bool ResourceEditorPlugin::initialize(const QStringList &arguments, QString *err ResourceEditorFactory *editor = new ResourceEditorFactory(this); addAutoReleasedObject(editor); - ResourceWizard *wizard = new ResourceWizard; - wizard->setDescription(tr("Creates a Qt Resource file (.qrc) that you can add to a Qt Widget Project.")); - wizard->setDisplayName(tr("Qt Resource file")); - wizard->setId(QLatin1String("F.Resource")); - wizard->setCategory(QLatin1String(Core::Constants::WIZARD_CATEGORY_QT)); - wizard->setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT)); - - addAutoReleasedObject(wizard); - errorMessage->clear(); // Register undo and redo diff --git a/src/plugins/resourceeditor/resourcewizard.cpp b/src/plugins/resourceeditor/resourcewizard.cpp deleted file mode 100644 index a5c446db5ea..00000000000 --- a/src/plugins/resourceeditor/resourcewizard.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#include "resourcewizard.h" -#include "resourceeditorw.h" -#include "resourceeditorconstants.h" - -using namespace ResourceEditor; -using namespace ResourceEditor::Internal; - -Core::GeneratedFiles -ResourceWizard::generateFilesFromPath(const QString &path, - const QString &name, - QString *errorMessage) const -{ - Q_UNUSED(errorMessage) - const QString suffix = preferredSuffix(QLatin1String(Constants::C_RESOURCE_MIMETYPE)); - const QString fileName = Core::BaseFileWizardFactory::buildFileName(path, name, suffix); - Core::GeneratedFile file(fileName); - file.setContents(QLatin1String("")); - file.setAttributes(Core::GeneratedFile::OpenEditorAttribute); - return Core::GeneratedFiles() << file; -} diff --git a/src/plugins/resourceeditor/resourcewizard.h b/src/plugins/resourceeditor/resourcewizard.h deleted file mode 100644 index 8aa874abb8d..00000000000 --- a/src/plugins/resourceeditor/resourcewizard.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#ifndef RESOURCEWIZARD_H -#define RESOURCEWIZARD_H - -#include - -namespace ResourceEditor { -namespace Internal { - -class ResourceWizard : public Core::StandardFileWizardFactory -{ - Q_OBJECT - -protected: - Core::GeneratedFiles generateFilesFromPath(const QString &path, const QString &name, - QString *errorMessage) const; -}; - -} // namespace Internal -} // namespace ResourceEditor - -#endif //RESOURCEWIZARD_H