~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/plugins/git/gerrit/gerritpushdialog.cpp

  • Committer: Timo Jyrinki
  • Date: 2013-12-02 09:16:15 UTC
  • mfrom: (1.1.29)
  • Revision ID: timo.jyrinki@canonical.com-20131202091615-xbj1os1f604ber1m
New upstream release candidate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
#include <QDateTime>
37
37
#include <QDir>
 
38
#include <QRegExpValidator>
38
39
 
39
40
namespace Gerrit {
40
41
namespace Internal {
79
80
        if (ref.contains(head) || ref.isEmpty())
80
81
            continue;
81
82
 
82
 
        remoteBranch = ref;
 
83
        if (remoteBranch.isEmpty())
 
84
            remoteBranch = ref;
83
85
 
84
86
        // Prefer remote tracking branch if it exists and contains the latest remote commit
85
 
        if (ref == remoteTrackingBranch)
 
87
        if (ref == remoteTrackingBranch) {
 
88
            remoteBranch = ref;
86
89
            break;
 
90
        }
87
91
    }
88
92
 
89
93
    if (!remoteBranch.isEmpty()) {
135
139
    connect(m_ui->branchComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setChangeRange()));
136
140
    setRemoteBranches();
137
141
    m_ui->reviewersLineEdit->setText(reviewerList);
 
142
 
 
143
    m_ui->topicLineEdit->setValidator(new QRegExpValidator(QRegExp(QLatin1String("^\\S+$")), this));
 
144
 
138
145
    m_valid = true;
139
146
}
140
147