diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/coreplugin/coreplugin.pro | 3 | ||||
-rw-r--r-- | src/plugins/coreplugin/coreplugin.qbs | 1 | ||||
-rw-r--r-- | src/plugins/coreplugin/removefiledialog.cpp | 57 | ||||
-rw-r--r-- | src/plugins/coreplugin/removefiledialog.h | 51 | ||||
-rw-r--r-- | src/plugins/coreplugin/removefiledialog.ui | 140 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.cpp | 6 | ||||
-rw-r--r-- | src/plugins/resourceeditor/qrceditor/resourcefile.cpp | 4 |
7 files changed, 5 insertions, 257 deletions
diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro index 5e6e934b76..dd6f03bdaa 100644 --- a/src/plugins/coreplugin/coreplugin.pro +++ b/src/plugins/coreplugin/coreplugin.pro @@ -100,7 +100,6 @@ SOURCES += corejsextensions.cpp \ idocumentfactory.cpp \ textdocument.cpp \ documentmanager.cpp \ - removefiledialog.cpp \ iversioncontrol.cpp \ dialogs/addtovcsdialog.cpp \ ioutputpane.cpp \ @@ -214,7 +213,6 @@ HEADERS += corejsextensions.h \ idocumentfactory.h \ textdocument.h \ documentmanager.h \ - removefiledialog.h \ dialogs/addtovcsdialog.h \ patchtool.h \ windowsupport.h \ @@ -234,7 +232,6 @@ FORMS += dialogs/newdialog.ui \ dialogs/externaltoolconfig.ui \ mimetypesettingspage.ui \ mimetypemagicdialog.ui \ - removefiledialog.ui \ dialogs/addtovcsdialog.ui \ systemsettings.ui diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs index 02ae8a768d..eabf668df7 100644 --- a/src/plugins/coreplugin/coreplugin.qbs +++ b/src/plugins/coreplugin/coreplugin.qbs @@ -89,7 +89,6 @@ Project { "patchtool.cpp", "patchtool.h", "plugindialog.cpp", "plugindialog.h", "reaper.cpp", "reaper.h", "reaper_p.h", - "removefiledialog.cpp", "removefiledialog.h", "removefiledialog.ui", "rightpane.cpp", "rightpane.h", "settingsdatabase.cpp", "settingsdatabase.h", "shellcommand.cpp", "shellcommand.h", diff --git a/src/plugins/coreplugin/removefiledialog.cpp b/src/plugins/coreplugin/removefiledialog.cpp deleted file mode 100644 index b7e6af6942..0000000000 --- a/src/plugins/coreplugin/removefiledialog.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "removefiledialog.h" -#include "ui_removefiledialog.h" - -#include <QDir> - -using namespace Core; - -RemoveFileDialog::RemoveFileDialog(const QString &filePath, QWidget *parent) : - QDialog(parent), - m_ui(new Ui::RemoveFileDialog) -{ - m_ui->setupUi(this); - m_ui->fileNameLabel->setText(QDir::toNativeSeparators(filePath)); - - // TODO - m_ui->removeVCCheckBox->setVisible(false); -} - -RemoveFileDialog::~RemoveFileDialog() -{ - delete m_ui; -} - -void RemoveFileDialog::setDeleteFileVisible(bool visible) -{ - m_ui->deleteFileCheckBox->setVisible(visible); -} - -bool RemoveFileDialog::isDeleteFileChecked() const -{ - return m_ui->deleteFileCheckBox->isChecked(); -} diff --git a/src/plugins/coreplugin/removefiledialog.h b/src/plugins/coreplugin/removefiledialog.h deleted file mode 100644 index f79dc82e02..0000000000 --- a/src/plugins/coreplugin/removefiledialog.h +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include "core_global.h" - -#include <QDialog> - -namespace Core { - -namespace Ui { class RemoveFileDialog; } - -class CORE_EXPORT RemoveFileDialog : public QDialog -{ - Q_OBJECT - -public: - explicit RemoveFileDialog(const QString &filePath, QWidget *parent = 0); - virtual ~RemoveFileDialog(); - - void setDeleteFileVisible(bool visible); - bool isDeleteFileChecked() const; - -private: - Ui::RemoveFileDialog *m_ui; -}; - -} // namespace Core diff --git a/src/plugins/coreplugin/removefiledialog.ui b/src/plugins/coreplugin/removefiledialog.ui deleted file mode 100644 index 1c89bc6e36..0000000000 --- a/src/plugins/coreplugin/removefiledialog.ui +++ /dev/null @@ -1,140 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>Core::RemoveFileDialog</class> - <widget class="QDialog" name="Core::RemoveFileDialog"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>514</width> - <height>159</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="windowTitle"> - <string>Remove File</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QLabel" name="fileToDeleteLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>File to remove:</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="fileNameLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <family>Courier New</family> - </font> - </property> - <property name="text"> - <string notr="true">placeholder</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>10</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="deleteFileCheckBox"> - <property name="text"> - <string>&Delete file permanently</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="removeVCCheckBox"> - <property name="text"> - <string>&Remove from Version Control</string> - </property> - </widget> - </item> - <item> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> - </property> - </widget> - </item> - </layout> - </widget> - <resources/> - <connections> - <connection> - <sender>buttonBox</sender> - <signal>accepted()</signal> - <receiver>Core::RemoveFileDialog</receiver> - <slot>accept()</slot> - <hints> - <hint type="sourcelabel"> - <x>248</x> - <y>254</y> - </hint> - <hint type="destinationlabel"> - <x>157</x> - <y>274</y> - </hint> - </hints> - </connection> - <connection> - <sender>buttonBox</sender> - <signal>rejected()</signal> - <receiver>Core::RemoveFileDialog</receiver> - <slot>reject()</slot> - <hints> - <hint type="sourcelabel"> - <x>316</x> - <y>260</y> - </hint> - <hint type="destinationlabel"> - <x>286</x> - <y>274</y> - </hint> - </hints> - </connection> - </connections> -</ui> diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index a8e98d32a6..31054027fb 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -113,7 +113,6 @@ #include <coreplugin/vcsmanager.h> #include <coreplugin/iversioncontrol.h> #include <coreplugin/fileutils.h> -#include <coreplugin/removefiledialog.h> #include <coreplugin/diffservice.h> #include <texteditor/findinfiles.h> #include <texteditor/textdocument.h> @@ -128,6 +127,7 @@ #include <utils/parameteraction.h> #include <utils/processhandle.h> #include <utils/qtcassert.h> +#include <utils/removefiledialog.h> #include <utils/stringutils.h> #include <utils/utilsicons.h> @@ -3221,7 +3221,7 @@ void ProjectExplorerPluginPrivate::removeProject() return; ProjectNode *projectNode = subProjectNode->managingProject(); if (projectNode) { - RemoveFileDialog removeFileDialog(subProjectNode->filePath().toString(), ICore::mainWindow()); + Utils::RemoveFileDialog removeFileDialog(subProjectNode->filePath().toString(), ICore::mainWindow()); removeFileDialog.setDeleteFileVisible(false); if (removeFileDialog.exec() == QDialog::Accepted) projectNode->removeSubProject(subProjectNode->filePath().toString()); @@ -3262,7 +3262,7 @@ void ProjectExplorerPluginPrivate::removeFile() QTC_ASSERT(currentNode && currentNode->nodeType() == NodeType::File, return); const Utils::FileName filePath = currentNode->filePath(); - RemoveFileDialog removeFileDialog(filePath.toString(), ICore::mainWindow()); + Utils::RemoveFileDialog removeFileDialog(filePath.toString(), ICore::mainWindow()); if (removeFileDialog.exec() == QDialog::Accepted) { const bool deleteFile = removeFileDialog.isDeleteFileChecked(); diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp index 5e17105cfa..a38a94da52 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp @@ -28,10 +28,10 @@ #include <coreplugin/fileiconprovider.h> #include <coreplugin/fileutils.h> #include <coreplugin/icore.h> -#include <coreplugin/removefiledialog.h> #include <coreplugin/vcsmanager.h> #include <projectexplorer/projectexplorerconstants.h> #include <utils/fileutils.h> +#include <utils/removefiledialog.h> #include <QCoreApplication> #include <QDebug> @@ -1234,7 +1234,7 @@ EntryBackup * RelativeResourceModel::removeEntry(const QModelIndex &index) deleteItem(index); return new FileEntryBackup(*this, prefixIndex.row(), index.row(), fileNameBackup, aliasBackup); } - Core::RemoveFileDialog removeFileDialog(fileNameBackup, Core::ICore::mainWindow()); + Utils::RemoveFileDialog removeFileDialog(fileNameBackup, Core::ICore::mainWindow()); if (removeFileDialog.exec() == QDialog::Accepted) { deleteItem(index); Core::FileUtils::removeFile(fileNameBackup, removeFileDialog.isDeleteFileChecked()); |