summaryrefslogtreecommitdiff
path: root/src/plugins/clearcase/clearcaseplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/clearcase/clearcaseplugin.cpp')
-rw-r--r--src/plugins/clearcase/clearcaseplugin.cpp58
1 files changed, 25 insertions, 33 deletions
diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp
index 8875886ffa..7217c6ae59 100644
--- a/src/plugins/clearcase/clearcaseplugin.cpp
+++ b/src/plugins/clearcase/clearcaseplugin.cpp
@@ -55,7 +55,7 @@
#include <coreplugin/mimedatabase.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/locator/commandlocator.h>
-#include <projectexplorer/projectexplorer.h>
+#include <projectexplorer/projecttree.h>
#include <projectexplorer/project.h>
#include <projectexplorer/iprojectmanager.h>
#include <utils/algorithm.h>
@@ -131,15 +131,15 @@ static const char CMD_ID_STATUS[] = "ClearCase.Status";
static const VcsBaseEditorParameters editorParameters[] = {
{
- VcsBase::LogOutput,
+ LogOutput,
"ClearCase File Log Editor", // id
QT_TRANSLATE_NOOP("VCS", "ClearCase File Log Editor"), // display_name
"text/vnd.qtcreator.clearcase.log"},
-{ VcsBase::AnnotateOutput,
+{ AnnotateOutput,
"ClearCase Annotation Editor", // id
QT_TRANSLATE_NOOP("VCS", "ClearCase Annotation Editor"), // display_name
"text/vnd.qtcreator.clearcase.annotation"},
-{ VcsBase::DiffOutput,
+{ DiffOutput,
"ClearCase Diff Editor", // id
QT_TRANSLATE_NOOP("VCS", "ClearCase Diff Editor"), // display_name
"text/x-patch"}
@@ -454,8 +454,8 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er
m_settings.fromSettings(ICore::settings());
// update view name when changing active project
- connect(ProjectExplorerPlugin::instance(), SIGNAL(currentProjectChanged(ProjectExplorer::Project*)),
- this, SLOT(projectChanged(ProjectExplorer::Project*)));
+ connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged,
+ this, &ClearCasePlugin::projectChanged);
addAutoReleasedObject(new SettingsPage);
@@ -633,7 +633,7 @@ bool ClearCasePlugin::submitEditorAboutToClose()
// Submit editor closing. Make it write out the check in message
// and retrieve files
- const QFileInfo editorFile(editorDocument->filePath());
+ const QFileInfo editorFile = editorDocument->filePath().toFileInfo();
const QFileInfo changeFile(m_checkInMessageFileName);
if (editorFile.absoluteFilePath() != changeFile.absoluteFilePath())
return true; // Oops?!
@@ -1198,11 +1198,11 @@ void ClearCasePlugin::startCheckInActivity()
QTC_ASSERT(state.hasProject(), return);
QDialog dlg;
- QVBoxLayout *layout = new QVBoxLayout(&dlg);
- ActivitySelector *actSelector = new ActivitySelector(&dlg);
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dlg);
- connect(buttonBox, SIGNAL(accepted()), &dlg, SLOT(accept()));
- connect(buttonBox, SIGNAL(rejected()), &dlg, SLOT(reject()));
+ auto layout = new QVBoxLayout(&dlg);
+ auto actSelector = new ActivitySelector(&dlg);
+ auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dlg);
+ connect(buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept);
+ connect(buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject);
layout->addWidget(actSelector);
layout->addWidget(buttonBox);
dlg.setWindowTitle(tr("Check In Activity"));
@@ -1327,8 +1327,9 @@ void ClearCasePlugin::viewStatus()
if (m_viewData.name.isEmpty())
m_viewData = ccGetView(m_topLevel);
QTC_ASSERT(!m_viewData.name.isEmpty() && !m_settings.disableIndexer, return);
- VcsOutputWindow::appendCommand(QLatin1String("Indexed files status (C=Checked Out, "
- "H=Hijacked, ?=Missing)"));
+ VcsOutputWindow::append(QLatin1String("Indexed files status (C=Checked Out, "
+ "H=Hijacked, ?=Missing)"),
+ VcsOutputWindow::Command, true);
bool anymod = false;
for (StatusMap::ConstIterator it = m_statusMap->constBegin();
it != m_statusMap->constEnd();
@@ -1482,11 +1483,11 @@ QString ClearCasePlugin::runCleartoolSync(const QString &workingDir,
}
ClearCaseResponse
- ClearCasePlugin::runCleartool(const QString &workingDir,
- const QStringList &arguments,
- int timeOut,
- unsigned flags,
- QTextCodec *outputCodec) const
+ClearCasePlugin::runCleartool(const QString &workingDir,
+ const QStringList &arguments,
+ int timeOut,
+ unsigned flags,
+ QTextCodec *outputCodec) const
{
const QString executable = m_settings.ccBinaryPath;
ClearCaseResponse response;
@@ -1734,27 +1735,23 @@ bool ClearCasePlugin::ccFileOp(const QString &workingDir, const QString &title,
{
const QString file = QDir::toNativeSeparators(fileName);
bool noCheckout = false;
- QVBoxLayout *verticalLayout;
ActivitySelector *actSelector = 0;
- QLabel *commentLabel;
- QTextEdit *commentEdit;
- QDialogButtonBox *buttonBox;
QDialog fileOpDlg;
fileOpDlg.setWindowTitle(title);
- verticalLayout = new QVBoxLayout(&fileOpDlg);
+ auto verticalLayout = new QVBoxLayout(&fileOpDlg);
if (m_viewData.isUcm) {
actSelector = new ActivitySelector;
verticalLayout->addWidget(actSelector);
}
- commentLabel = new QLabel(tr("Enter &comment:"));
+ auto commentLabel = new QLabel(tr("Enter &comment:"));
verticalLayout->addWidget(commentLabel);
- commentEdit = new QTextEdit;
+ auto commentEdit = new QTextEdit;
verticalLayout->addWidget(commentEdit);
- buttonBox = new QDialogButtonBox;
+ auto buttonBox = new QDialogButtonBox;
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
verticalLayout->addWidget(buttonBox);
@@ -1851,11 +1848,6 @@ bool ClearCasePlugin::vcsCheckout(const QString & /*directory*/, const QByteArra
return false;
}
-QString ClearCasePlugin::vcsGetRepositoryURL(const QString & /*directory*/)
-{
- return currentState().topLevel();
-}
-
///
/// Check if the directory is managed under ClearCase control.
///
@@ -2064,7 +2056,7 @@ void ClearCasePlugin::updateIndex()
{
QTC_ASSERT(currentState().hasTopLevel(), return);
ProgressManager::cancelTasks(ClearCase::Constants::TASK_INDEX);
- Project *project = ProjectExplorerPlugin::currentProject();
+ Project *project = ProjectTree::currentProject();
if (!project)
return;
m_checkInAllAction->setEnabled(false);