forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.6'
Conflicts: src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/madde/maemoglobal.cpp src/plugins/madde/maemoinstalltosysrootstep.cpp src/plugins/madde/maemopublisherfremantlefree.cpp src/plugins/madde/qt4maemodeployconfiguration.cpp src/plugins/qt4projectmanager/librarydetailscontroller.cpp src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp src/plugins/qt4projectmanager/qt4buildconfiguration.cpp src/plugins/qt4projectmanager/qt4project.cpp src/plugins/qtsupport/baseqtversion.cpp src/plugins/remotelinux/abstractremotelinuxdeployservice.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp src/plugins/remotelinux/remotelinuxrunconfiguration.cpp src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp Change-Id: I2560b528596f284e7b45a2260d8d3037891c5d17
This commit is contained in:
@@ -102,7 +102,8 @@ SOURCES += mainwindow.cpp \
|
||||
idocument.cpp \
|
||||
textdocument.cpp \
|
||||
documentmanager.cpp \
|
||||
removefiledialog.cpp
|
||||
removefiledialog.cpp \
|
||||
iversioncontrol.cpp
|
||||
|
||||
HEADERS += mainwindow.h \
|
||||
editmode.h \
|
||||
|
||||
@@ -152,6 +152,7 @@ QtcPlugin {
|
||||
"versiondialog.cpp",
|
||||
"versiondialog.h",
|
||||
"id.cpp",
|
||||
"iversioncontrol.cpp",
|
||||
"iversioncontrol.h",
|
||||
"variablechooser.cpp",
|
||||
"variablemanager.cpp",
|
||||
|
||||
@@ -825,15 +825,20 @@ DocumentManager::ReadOnlyAction
|
||||
tr("The file <i>%1</i> is read only.").arg(QDir::toNativeSeparators(fileName)),
|
||||
QMessageBox::Cancel, parent);
|
||||
|
||||
QString makeWritableText;
|
||||
QPushButton *vcsButton = 0;
|
||||
if (promptVCS)
|
||||
vcsButton = msgBox.addButton(tr("Open with VCS (%1)").arg(versionControl->displayName()), QMessageBox::AcceptRole);
|
||||
if (promptVCS) {
|
||||
vcsButton = msgBox.addButton(versionControl->vcsOpenText(), QMessageBox::AcceptRole);
|
||||
makeWritableText = versionControl->vcsMakeWritableText();
|
||||
}
|
||||
if (makeWritableText.isEmpty())
|
||||
makeWritableText = tr("Make &Writable");
|
||||
|
||||
QPushButton *makeWritableButton = msgBox.addButton(tr("Make Writable"), QMessageBox::AcceptRole);
|
||||
QPushButton *makeWritableButton = msgBox.addButton(makeWritableText, QMessageBox::AcceptRole);
|
||||
|
||||
QPushButton *saveAsButton = 0;
|
||||
if (displaySaveAsButton)
|
||||
saveAsButton = msgBox.addButton(tr("Save As..."), QMessageBox::ActionRole);
|
||||
saveAsButton = msgBox.addButton(tr("&Save As..."), QMessageBox::ActionRole);
|
||||
|
||||
msgBox.setDefaultButton(vcsButton ? vcsButton : makeWritableButton);
|
||||
msgBox.exec();
|
||||
|
||||
45
src/plugins/coreplugin/iversioncontrol.cpp
Normal file
45
src/plugins/coreplugin/iversioncontrol.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** 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, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "iversioncontrol.h"
|
||||
|
||||
namespace Core {
|
||||
|
||||
QString IVersionControl::vcsOpenText() const
|
||||
{
|
||||
return tr("Open with VCS (%1)").arg(displayName());
|
||||
}
|
||||
|
||||
QString IVersionControl::vcsMakeWritableText() const
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -163,6 +163,16 @@ public:
|
||||
*/
|
||||
virtual bool vcsAnnotate(const QString &file, int line) = 0;
|
||||
|
||||
/*!
|
||||
* Display text for Open operation
|
||||
*/
|
||||
virtual QString vcsOpenText() const;
|
||||
|
||||
/*!
|
||||
* Display text for Make Writable
|
||||
*/
|
||||
virtual QString vcsMakeWritableText() const;
|
||||
|
||||
signals:
|
||||
void repositoryChanged(const QString &repository);
|
||||
void filesChanged(const QStringList &files);
|
||||
|
||||
Reference in New Issue
Block a user