forked from qt-creator/qt-creator
ClearCase: Sprinkle with auto
Change-Id: Ia003b873cf4802df506ab6090dbb93858d7526d0 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -50,10 +50,10 @@ ActivitySelector::ActivitySelector(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(m_plugin->isUcm(), return);
|
QTC_ASSERT(m_plugin->isUcm(), return);
|
||||||
|
|
||||||
QHBoxLayout *hboxLayout = new QHBoxLayout(this);
|
auto hboxLayout = new QHBoxLayout(this);
|
||||||
hboxLayout->setContentsMargins(0, 0, 0, 0);
|
hboxLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
QLabel *lblActivity = new QLabel(tr("Select &activity:"));
|
auto lblActivity = new QLabel(tr("Select &activity:"));
|
||||||
lblActivity->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
|
lblActivity->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
|
||||||
hboxLayout->addWidget(lblActivity);
|
hboxLayout->addWidget(lblActivity);
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ ActivitySelector::ActivitySelector(QWidget *parent) :
|
|||||||
QString addText = tr("Add");
|
QString addText = tr("Add");
|
||||||
if (!m_plugin->settings().autoAssignActivityName)
|
if (!m_plugin->settings().autoAssignActivityName)
|
||||||
addText.append(QLatin1String("..."));
|
addText.append(QLatin1String("..."));
|
||||||
QToolButton *btnAdd = new QToolButton;
|
auto btnAdd = new QToolButton;
|
||||||
btnAdd->setText(addText);
|
btnAdd->setText(addText);
|
||||||
hboxLayout->addWidget(btnAdd);
|
hboxLayout->addWidget(btnAdd);
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ CheckOutDialog::CheckOutDialog(const QString &fileName, bool isUcm, QWidget *par
|
|||||||
|
|
||||||
ui->verticalLayout->insertWidget(0, m_actSelector);
|
ui->verticalLayout->insertWidget(0, m_actSelector);
|
||||||
|
|
||||||
QFrame *line = new QFrame(this);
|
auto line = new QFrame(this);
|
||||||
line->setFrameShape(QFrame::HLine);
|
line->setFrameShape(QFrame::HLine);
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
line->setFrameShadow(QFrame::Sunken);
|
||||||
|
|
||||||
|
@@ -1198,11 +1198,11 @@ void ClearCasePlugin::startCheckInActivity()
|
|||||||
QTC_ASSERT(state.hasProject(), return);
|
QTC_ASSERT(state.hasProject(), return);
|
||||||
|
|
||||||
QDialog dlg;
|
QDialog dlg;
|
||||||
QVBoxLayout *layout = new QVBoxLayout(&dlg);
|
auto layout = new QVBoxLayout(&dlg);
|
||||||
ActivitySelector *actSelector = new ActivitySelector(&dlg);
|
auto actSelector = new ActivitySelector(&dlg);
|
||||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dlg);
|
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dlg);
|
||||||
connect(buttonBox, SIGNAL(accepted()), &dlg, SLOT(accept()));
|
connect(buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept);
|
||||||
connect(buttonBox, SIGNAL(rejected()), &dlg, SLOT(reject()));
|
connect(buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject);
|
||||||
layout->addWidget(actSelector);
|
layout->addWidget(actSelector);
|
||||||
layout->addWidget(buttonBox);
|
layout->addWidget(buttonBox);
|
||||||
dlg.setWindowTitle(tr("Check In Activity"));
|
dlg.setWindowTitle(tr("Check In Activity"));
|
||||||
@@ -1735,27 +1735,23 @@ bool ClearCasePlugin::ccFileOp(const QString &workingDir, const QString &title,
|
|||||||
{
|
{
|
||||||
const QString file = QDir::toNativeSeparators(fileName);
|
const QString file = QDir::toNativeSeparators(fileName);
|
||||||
bool noCheckout = false;
|
bool noCheckout = false;
|
||||||
QVBoxLayout *verticalLayout;
|
|
||||||
ActivitySelector *actSelector = 0;
|
ActivitySelector *actSelector = 0;
|
||||||
QLabel *commentLabel;
|
|
||||||
QTextEdit *commentEdit;
|
|
||||||
QDialogButtonBox *buttonBox;
|
|
||||||
QDialog fileOpDlg;
|
QDialog fileOpDlg;
|
||||||
fileOpDlg.setWindowTitle(title);
|
fileOpDlg.setWindowTitle(title);
|
||||||
|
|
||||||
verticalLayout = new QVBoxLayout(&fileOpDlg);
|
auto verticalLayout = new QVBoxLayout(&fileOpDlg);
|
||||||
if (m_viewData.isUcm) {
|
if (m_viewData.isUcm) {
|
||||||
actSelector = new ActivitySelector;
|
actSelector = new ActivitySelector;
|
||||||
verticalLayout->addWidget(actSelector);
|
verticalLayout->addWidget(actSelector);
|
||||||
}
|
}
|
||||||
|
|
||||||
commentLabel = new QLabel(tr("Enter &comment:"));
|
auto commentLabel = new QLabel(tr("Enter &comment:"));
|
||||||
verticalLayout->addWidget(commentLabel);
|
verticalLayout->addWidget(commentLabel);
|
||||||
|
|
||||||
commentEdit = new QTextEdit;
|
auto commentEdit = new QTextEdit;
|
||||||
verticalLayout->addWidget(commentEdit);
|
verticalLayout->addWidget(commentEdit);
|
||||||
|
|
||||||
buttonBox = new QDialogButtonBox;
|
auto buttonBox = new QDialogButtonBox;
|
||||||
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||||
verticalLayout->addWidget(buttonBox);
|
verticalLayout->addWidget(buttonBox);
|
||||||
|
|
||||||
|
@@ -57,7 +57,7 @@ void ClearCaseSubmitEditor::setIsUcm(bool isUcm)
|
|||||||
void ClearCaseSubmitEditor::setStatusList(const QStringList &statusOutput)
|
void ClearCaseSubmitEditor::setStatusList(const QStringList &statusOutput)
|
||||||
{
|
{
|
||||||
typedef QStringList::const_iterator ConstIterator;
|
typedef QStringList::const_iterator ConstIterator;
|
||||||
VcsBase::SubmitFileModel *model = new VcsBase::SubmitFileModel(this);
|
auto model = new VcsBase::SubmitFileModel(this);
|
||||||
|
|
||||||
const ConstIterator cend = statusOutput.constEnd();
|
const ConstIterator cend = statusOutput.constEnd();
|
||||||
for (ConstIterator it = statusOutput.constBegin(); it != cend; ++it)
|
for (ConstIterator it = statusOutput.constBegin(); it != cend; ++it)
|
||||||
|
@@ -44,7 +44,7 @@ ClearCaseSubmitEditorWidget::ClearCaseSubmitEditorWidget()
|
|||||||
: m_actSelector(0)
|
: m_actSelector(0)
|
||||||
{
|
{
|
||||||
setDescriptionMandatory(false);
|
setDescriptionMandatory(false);
|
||||||
QWidget *checkInWidget = new QWidget(this);
|
auto checkInWidget = new QWidget(this);
|
||||||
|
|
||||||
m_verticalLayout = new QVBoxLayout(checkInWidget);
|
m_verticalLayout = new QVBoxLayout(checkInWidget);
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ void ClearCaseSubmitEditorWidget::addActivitySelector(bool isUcm)
|
|||||||
m_actSelector = new ActivitySelector;
|
m_actSelector = new ActivitySelector;
|
||||||
m_verticalLayout->insertWidget(0, m_actSelector);
|
m_verticalLayout->insertWidget(0, m_actSelector);
|
||||||
|
|
||||||
QFrame* line = new QFrame;
|
auto line = new QFrame;
|
||||||
line->setFrameShape(QFrame::HLine);
|
line->setFrameShape(QFrame::HLine);
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
line->setFrameShadow(QFrame::Sunken);
|
||||||
m_verticalLayout->insertWidget(1, line);
|
m_verticalLayout->insertWidget(1, line);
|
||||||
|
Reference in New Issue
Block a user