Changeset View
Changeset View
Standalone View
Standalone View
plugins/ghprovider/ghproviderwidget.cpp
Show All 34 Lines | |||||
35 | #include <ghdialog.h> | 35 | #include <ghdialog.h> | ||
36 | #include <ghresource.h> | 36 | #include <ghresource.h> | ||
37 | #include <ghlineedit.h> | 37 | #include <ghlineedit.h> | ||
38 | #include <ghprovidermodel.h> | 38 | #include <ghprovidermodel.h> | ||
39 | 39 | | |||
40 | #include <KLocalizedString> | 40 | #include <KLocalizedString> | ||
41 | #include <KMessageBox> | 41 | #include <KMessageBox> | ||
42 | 42 | | |||
43 | #include <qtcompat_p.h> | ||||
44 | | ||||
43 | using namespace KDevelop; | 45 | using namespace KDevelop; | ||
44 | namespace gh | 46 | namespace gh | ||
45 | { | 47 | { | ||
46 | 48 | | |||
47 | ProviderWidget::ProviderWidget(QWidget *parent) | 49 | ProviderWidget::ProviderWidget(QWidget *parent) | ||
48 | : IProjectProviderWidget(parent) | 50 | : IProjectProviderWidget(parent) | ||
49 | { | 51 | { | ||
50 | setLayout(new QVBoxLayout()); | 52 | setLayout(new QVBoxLayout()); | ||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | 159 | case 1: /* Looking for some user's repo */ | |||
158 | if (text == m_account->name()) | 160 | if (text == m_account->name()) | ||
159 | uri = QStringLiteral("/user/repos"); | 161 | uri = QStringLiteral("/user/repos"); | ||
160 | else | 162 | else | ||
161 | uri = QStringLiteral("/users/%1/repos").arg(text); | 163 | uri = QStringLiteral("/users/%1/repos").arg(text); | ||
162 | break; | 164 | break; | ||
163 | case 2: /* Known organization */ | 165 | case 2: /* Known organization */ | ||
164 | text = m_combo->currentText(); | 166 | text = m_combo->currentText(); | ||
165 | enabled = false; | 167 | enabled = false; | ||
168 | Q_FALLTHROUGH(); | ||||
aaronpuchert: Looks suspicious to me, is that intended? | |||||
I'm pretty sure this is actually intended, maybe @mssola can confirm that. aaronpuchert: I'm pretty sure this is actually intended, maybe @mssola can confirm that. | |||||
166 | default:/* Looking for some organization's repo. */ | 169 | default:/* Looking for some organization's repo. */ | ||
167 | uri = QStringLiteral("/orgs/%1/repos").arg(text); | 170 | uri = QStringLiteral("/orgs/%1/repos").arg(text); | ||
168 | break; | 171 | break; | ||
169 | } | 172 | } | ||
170 | m_edit->setEnabled(enabled); | 173 | m_edit->setEnabled(enabled); | ||
171 | m_waiting->show(); | 174 | m_waiting->show(); | ||
172 | m_resource->searchRepos(uri, m_account->token()); | 175 | m_resource->searchRepos(uri, m_account->token()); | ||
173 | } | 176 | } | ||
174 | 177 | | |||
175 | } // End of namespace gh | 178 | } // End of namespace gh |
Looks suspicious to me, is that intended?