diff --git a/src/plugins/git/branchcheckoutdialog.cpp b/src/plugins/git/branchcheckoutdialog.cpp index 8e71d1cf0bd118621e3a484895578a2fe8dd9690..d8fe4314aff6fcc5914a4d47e589c45b1f58f127 100644 --- a/src/plugins/git/branchcheckoutdialog.cpp +++ b/src/plugins/git/branchcheckoutdialog.cpp @@ -34,8 +34,8 @@ namespace Git { namespace Internal { BranchCheckoutDialog::BranchCheckoutDialog(QWidget *parent, - const QString& currentBranch, - const QString& nextBranch) : + const QString ¤tBranch, + const QString &nextBranch) : QDialog(parent), m_ui(new Ui::BranchCheckoutDialog), m_foundStashForNextBranch(false), diff --git a/src/plugins/git/branchcheckoutdialog.h b/src/plugins/git/branchcheckoutdialog.h index 22f3a961f43c5f36a5d8aeb08a396b36a68f1dc3..fd4250ac1aa193d08fee52f333b053af1a7b174c 100644 --- a/src/plugins/git/branchcheckoutdialog.h +++ b/src/plugins/git/branchcheckoutdialog.h @@ -44,8 +44,8 @@ class BranchCheckoutDialog : public QDialog Q_OBJECT public: - explicit BranchCheckoutDialog(QWidget *parent, const QString& currentBranch, - const QString& nextBranch); + explicit BranchCheckoutDialog(QWidget *parent, const QString ¤tBranch, + const QString &nextBranch); ~BranchCheckoutDialog(); void foundNoLocalChanges(); diff --git a/src/plugins/git/commitdata.cpp b/src/plugins/git/commitdata.cpp index c7e9097d512c9ccfd5db6b75e5af0850a5a84f08..d17cf89d1c80fc3fc58aee7e069cea46014a927a 100644 --- a/src/plugins/git/commitdata.cpp +++ b/src/plugins/git/commitdata.cpp @@ -136,8 +136,8 @@ bool CommitData::checkLine(const QString &stateInfo, const QString &file) if (xState == UnknownFileState || yState == UnknownFileState) return false; - bool isMerge = (xState == UnmergedFile || yState == UnmergedFile || - ((xState == yState) && (xState == AddedFile || xState == DeletedFile))); + bool isMerge = (xState == UnmergedFile || yState == UnmergedFile + || ((xState == yState) && (xState == AddedFile || xState == DeletedFile))); if (isMerge) { if (xState == yState) { if (xState == UnmergedFile) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 4b432d8b457400bd893e01e8bd40e1e0e7128f2a..66cb3034845cace5b7bc1df437900491e0604b66 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2369,10 +2369,9 @@ QStringList GitClient::synchronousRepositoryBranches(const QString &repositoryUR { QStringList arguments(QLatin1String("ls-remote")); arguments << repositoryURL << QLatin1String(HEAD) << QLatin1String("refs/heads/*"); - const unsigned flags = - VcsBasePlugin::SshPasswordPrompt| - VcsBasePlugin::SuppressStdErrInLogWindow| - VcsBasePlugin::SuppressFailMessageInLogWindow; + const unsigned flags = VcsBasePlugin::SshPasswordPrompt + | VcsBasePlugin::SuppressStdErrInLogWindow + | VcsBasePlugin::SuppressFailMessageInLogWindow; const Utils::SynchronousProcessResponse resp = synchronousGit(QString(), arguments, flags); QStringList branches; branches << tr("<Detached HEAD>"); @@ -2780,7 +2779,7 @@ GitClient::RevertResult GitClient::revertI(QStringList files, = QMessageBox::question(Core::ICore::mainWindow(), tr("Revert"), tr("The file has been changed. Do you want to revert it?"), - QMessageBox::Yes|QMessageBox::No, + QMessageBox::Yes | QMessageBox::No, QMessageBox::No); if (answer == QMessageBox::No) return RevertCanceled; @@ -2832,7 +2831,8 @@ bool GitClient::executeAndHandleConflicts(const QString &workingDirectory, const QString &abortCommand) { // Disable UNIX terminals to suppress SSH prompting. - const unsigned flags = VcsBasePlugin::SshPasswordPrompt | VcsBasePlugin::ShowStdOutInLogWindow + const unsigned flags = VcsBasePlugin::SshPasswordPrompt + | VcsBasePlugin::ShowStdOutInLogWindow | VcsBasePlugin::ExpectRepoChanges; const Utils::SynchronousProcessResponse resp = synchronousGit(workingDirectory, arguments, flags); ConflictHandler conflictHandler(0, workingDirectory, abortCommand); @@ -2936,8 +2936,9 @@ void GitClient::synchronousSubversionFetch(const QString &workingDirectory) QStringList args; args << QLatin1String("svn") << QLatin1String("fetch"); // Disable UNIX terminals to suppress SSH prompting. - const unsigned flags = VcsBasePlugin::SshPasswordPrompt|VcsBasePlugin::ShowStdOutInLogWindow - |VcsBasePlugin::ShowSuccessMessage; + const unsigned flags = VcsBasePlugin::SshPasswordPrompt + | VcsBasePlugin::ShowStdOutInLogWindow + | VcsBasePlugin::ShowSuccessMessage; synchronousGit(workingDirectory, args, flags); } @@ -3198,9 +3199,9 @@ QString GitClient::readConfigValue(const QString &workingDirectory, const QStrin bool GitClient::cloneRepository(const QString &directory,const QByteArray &url) { QDir workingDirectory(directory); - const unsigned flags = VcsBasePlugin::SshPasswordPrompt | - VcsBasePlugin::ShowStdOutInLogWindow| - VcsBasePlugin::ShowSuccessMessage; + const unsigned flags = VcsBasePlugin::SshPasswordPrompt + | VcsBasePlugin::ShowStdOutInLogWindow + | VcsBasePlugin::ShowSuccessMessage; if (workingDirectory.exists()) { if (!synchronousInit(workingDirectory.path())) diff --git a/src/plugins/git/gitorious/gitorioushostwidget.cpp b/src/plugins/git/gitorious/gitorioushostwidget.cpp index 4c67c425a84bb8f13cd7f7490e9ef521f70a842e..3aedcf00462135ba1ed4314cde18d78352294a4a 100644 --- a/src/plugins/git/gitorious/gitorioushostwidget.cpp +++ b/src/plugins/git/gitorious/gitorioushostwidget.cpp @@ -57,8 +57,8 @@ static QList<QStandardItem *> hostEntry(const QString &host, int projectCount, const QString &description, bool isDummyEntry) { - const Qt::ItemFlags nonEditableFlags = (Qt::ItemIsSelectable|Qt::ItemIsEnabled); - const Qt::ItemFlags editableFlags = nonEditableFlags|Qt::ItemIsEditable; + const Qt::ItemFlags nonEditableFlags = (Qt::ItemIsSelectable | Qt::ItemIsEnabled); + const Qt::ItemFlags editableFlags = nonEditableFlags | Qt::ItemIsEditable; QStandardItem *hostItem = new QStandardItem(host); hostItem->setFlags(isDummyEntry ? editableFlags : nonEditableFlags); // Empty for dummy, else "..." or count @@ -154,7 +154,10 @@ void GitoriousHostWidget::selectRow(int r) { if (r >= 0 && r != selectedRow()) { const QModelIndex index = m_model->index(r, 0); - ui->hostView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::Select|QItemSelectionModel::Current|QItemSelectionModel::Rows); + ui->hostView->selectionModel()->setCurrentIndex(index, + QItemSelectionModel::Select + | QItemSelectionModel::Current + | QItemSelectionModel::Rows); } } diff --git a/src/plugins/git/gitorious/gitoriousprojectwidget.cpp b/src/plugins/git/gitorious/gitoriousprojectwidget.cpp index 6c7d128dbbc37ef62c5fe65b4f0ef9d899af4f81..1e9f970d8b7888c0f7be5f849c1f55a70fbf6ae1 100644 --- a/src/plugins/git/gitorious/gitoriousprojectwidget.cpp +++ b/src/plugins/git/gitorious/gitoriousprojectwidget.cpp @@ -100,7 +100,10 @@ GitoriousProjectWidget::GitoriousProjectWidget(int hostIndex, ui->projectTreeView->resizeColumnToContents(r); // Select first const QModelIndex index = m_filterModel->index(0, 0); - ui->projectTreeView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::Select|QItemSelectionModel::Current|QItemSelectionModel::Rows); + ui->projectTreeView->selectionModel()->setCurrentIndex(index, + QItemSelectionModel::Select + | QItemSelectionModel::Current + | QItemSelectionModel::Rows); } // Continuous update @@ -175,10 +178,10 @@ static inline QList<QStandardItem *> projectEntry(const GitoriousProject &p) name += QLatin1String("..."); } QStandardItem *nameItem = new QStandardItem(name); - nameItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); + nameItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); // Description QStandardItem *descriptionItem = new QStandardItem; - descriptionItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); + descriptionItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); QList<QStandardItem *> rc; rc << nameItem << descriptionItem; // Should the text contain an URL, store it under 'urlRole' for the info button diff --git a/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp b/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp index d90719e5c2d0971df0a671969b42b8df046814da..6b568e0a496c3cf6dd7bf52ae94385f956e672d4 100644 --- a/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp +++ b/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp @@ -128,13 +128,13 @@ static inline QList<QStandardItem *> headerEntry(const QString &h) static inline QList<QStandardItem *> repositoryEntry(const GitoriousRepository &r) { QStandardItem *nameItem = new QStandardItem(r.name); - nameItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); + nameItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); nameItem->setData(QVariant(RepositoryType), TypeRole); QStandardItem *ownerItem = new QStandardItem(r.owner); - ownerItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); + ownerItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ownerItem->setData(QVariant(RepositoryType), TypeRole); QStandardItem *descriptionItem = new QStandardItem; - descriptionItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); + descriptionItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); descriptionItem->setData(QVariant(RepositoryType), TypeRole); QList<QStandardItem *> rc; rc << nameItem << ownerItem << descriptionItem; @@ -182,7 +182,10 @@ void GitoriousRepositoryWizardPage::initializePage() // Select first if (firstEntry) { const QModelIndex filterIndex = m_filterModel->mapFromSource(m_model->indexFromItem(firstEntry)); - ui->repositoryTreeView->selectionModel()->setCurrentIndex(filterIndex, QItemSelectionModel::Select|QItemSelectionModel::Current|QItemSelectionModel::Rows); + ui->repositoryTreeView->selectionModel()->setCurrentIndex(filterIndex, + QItemSelectionModel::Select + | QItemSelectionModel::Current + | QItemSelectionModel::Rows); } ui->repositoryTreeView->setFocus(); } diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 69b696fb6a553b786db39cfa89c21e0b87e7313c..a6818aa883315577380e2cb8342262bac15d557b 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1285,7 +1285,7 @@ void GitPlugin::stashSnapshot() const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); const QString id = m_gitClient->synchronousStash(state.topLevel(), QString(), - GitClient::StashImmediateRestore|GitClient::StashPromptDescription); + GitClient::StashImmediateRestore | GitClient::StashPromptDescription); if (!id.isEmpty() && m_stashDialog) m_stashDialog->refresh(state.topLevel(), true); } diff --git a/src/plugins/git/gitversioncontrol.cpp b/src/plugins/git/gitversioncontrol.cpp index 605fb8c3e7665eec4c092e140ecb37eef8afcb70..9c1c81fda225635774c02b614bc3f1fe5d62c76f 100644 --- a/src/plugins/git/gitversioncontrol.cpp +++ b/src/plugins/git/gitversioncontrol.cpp @@ -142,8 +142,9 @@ QString GitVersionControl::vcsCreateSnapshot(const QString &topLevel) QString keyword = QLatin1String(stashMessageKeywordC) + QString::number(n++); const QString stashMessage = m_client->synchronousStash(topLevel, keyword, - GitClient::StashImmediateRestore|GitClient::StashIgnoreUnchanged, - &repositoryUnchanged); + GitClient::StashImmediateRestore + | GitClient::StashIgnoreUnchanged, + &repositoryUnchanged); if (!stashMessage.isEmpty()) return stashMessage; if (repositoryUnchanged) { diff --git a/src/plugins/git/mergetool.cpp b/src/plugins/git/mergetool.cpp index 7dbf931d1798fa28820caca7390ec0f761cdcef7..5f1432d856f068dd6be26455bcabb7159cc52583 100644 --- a/src/plugins/git/mergetool.cpp +++ b/src/plugins/git/mergetool.cpp @@ -248,7 +248,8 @@ void MergeTool::readData() } else if (m_merging && line.startsWith("Continue merging")) { if (QMessageBox::question(0, tr("Continue Merging"), tr("Continue merging other unresolved paths?"), - QMessageBox::Yes|QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) { + QMessageBox::Yes | QMessageBox::No, + QMessageBox::No) == QMessageBox::Yes) { m_process->write("y\n"); } else { m_process->write("n\n"); diff --git a/src/plugins/git/remotedialog.cpp b/src/plugins/git/remotedialog.cpp index d24bc2789cadf4372e83f5a97fa9f3eac93afa93..98078168291a75aaf00fe4aa51fdf3c0645eb29f 100644 --- a/src/plugins/git/remotedialog.cpp +++ b/src/plugins/git/remotedialog.cpp @@ -159,7 +159,8 @@ void RemoteDialog::removeRemote() const QString remoteName = m_remoteModel->remoteName(row); if (QMessageBox::question(this, tr("Delete Remote"), tr("Would you like to delete the remote \"%1\"?").arg(remoteName), - QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes) { + QMessageBox::Yes | QMessageBox::No, + QMessageBox::Yes) == QMessageBox::Yes) { m_remoteModel->removeRemote(row); } } diff --git a/src/plugins/git/remotemodel.cpp b/src/plugins/git/remotemodel.cpp index 4fa1b23350b823497891ad17895265082b0da310..d7ad7a3147de3a38ab13b5121ced7eff4ff12578 100644 --- a/src/plugins/git/remotemodel.cpp +++ b/src/plugins/git/remotemodel.cpp @@ -36,7 +36,7 @@ namespace Internal { // ------ RemoteModel RemoteModel::RemoteModel(GitClient *client, QObject *parent) : QAbstractTableModel(parent), - m_flags(Qt::ItemIsSelectable|Qt::ItemIsEnabled|Qt::ItemIsEditable), + m_flags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable), m_client(client) { } diff --git a/src/plugins/git/stashdialog.cpp b/src/plugins/git/stashdialog.cpp index 137a6ed9211910210301cde0dff418959b5d1369..2b8048faf74ad4da6bd27eaf400fc4041725cd04 100644 --- a/src/plugins/git/stashdialog.cpp +++ b/src/plugins/git/stashdialog.cpp @@ -56,7 +56,7 @@ static inline GitClient *gitClient() static inline QList<QStandardItem*> stashModelRowItems(const Stash &s) { - Qt::ItemFlags itemFlags = Qt::ItemIsSelectable|Qt::ItemIsEnabled; + Qt::ItemFlags itemFlags = Qt::ItemIsSelectable | Qt::ItemIsEnabled; QStandardItem *nameItem = new QStandardItem(s.name); nameItem->setFlags(itemFlags); QStandardItem *branchItem = new QStandardItem(s.branch); @@ -402,8 +402,9 @@ void StashDialog::warning(const QString &title, const QString &what, const QStri bool StashDialog::ask(const QString &title, const QString &what, bool defaultButton) { - return QMessageBox::question(this, title, what, QMessageBox::Yes|QMessageBox::No, - defaultButton ? QMessageBox::Yes : QMessageBox::No) == QMessageBox::Yes; + return QMessageBox::question( + this, title, what, QMessageBox::Yes | QMessageBox::No, + defaultButton ? QMessageBox::Yes : QMessageBox::No) == QMessageBox::Yes; } } // namespace Internal