Commit 32c93d26 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

ClearCase: Sprinkle with auto



Change-Id: Ia003b873cf4802df506ab6090dbb93858d7526d0
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent d2da1a94
......@@ -50,10 +50,10 @@ ActivitySelector::ActivitySelector(QWidget *parent) :
{
QTC_ASSERT(m_plugin->isUcm(), return);
QHBoxLayout *hboxLayout = new QHBoxLayout(this);
auto hboxLayout = new QHBoxLayout(this);
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);
hboxLayout->addWidget(lblActivity);
......@@ -64,7 +64,7 @@ ActivitySelector::ActivitySelector(QWidget *parent) :
QString addText = tr("Add");
if (!m_plugin->settings().autoAssignActivityName)
addText.append(QLatin1String("..."));
QToolButton *btnAdd = new QToolButton;
auto btnAdd = new QToolButton;
btnAdd->setText(addText);
hboxLayout->addWidget(btnAdd);
......
......@@ -52,7 +52,7 @@ CheckOutDialog::CheckOutDialog(const QString &fileName, bool isUcm, QWidget *par
ui->verticalLayout->insertWidget(0, m_actSelector);
QFrame *line = new QFrame(this);
auto line = new QFrame(this);
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
......
......@@ -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"));
......@@ -1735,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);
......
......@@ -57,7 +57,7 @@ void ClearCaseSubmitEditor::setIsUcm(bool isUcm)
void ClearCaseSubmitEditor::setStatusList(const QStringList &statusOutput)
{
typedef QStringList::const_iterator ConstIterator;
VcsBase::SubmitFileModel *model = new VcsBase::SubmitFileModel(this);
auto model = new VcsBase::SubmitFileModel(this);
const ConstIterator cend = statusOutput.constEnd();
for (ConstIterator it = statusOutput.constBegin(); it != cend; ++it)
......
......@@ -44,7 +44,7 @@ ClearCaseSubmitEditorWidget::ClearCaseSubmitEditorWidget()
: m_actSelector(0)
{
setDescriptionMandatory(false);
QWidget *checkInWidget = new QWidget(this);
auto checkInWidget = new QWidget(this);
m_verticalLayout = new QVBoxLayout(checkInWidget);
......@@ -98,7 +98,7 @@ void ClearCaseSubmitEditorWidget::addActivitySelector(bool isUcm)
m_actSelector = new ActivitySelector;
m_verticalLayout->insertWidget(0, m_actSelector);
QFrame* line = new QFrame;
auto line = new QFrame;
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
m_verticalLayout->insertWidget(1, line);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment