Merge lp:~carlos-mazieri/ubuntu-filemanager-app/samba-browsing-10 into lp:ubuntu-filemanager-app
- samba-browsing-10
- Merge into trunk
Proposed by
Carlos Jose Mazieri
Status: | Merged |
---|---|
Approved by: | Arto Jalkanen |
Approved revision: | 397 |
Merged at revision: | 415 |
Proposed branch: | lp:~carlos-mazieri/ubuntu-filemanager-app/samba-browsing-10 |
Merge into: | lp:ubuntu-filemanager-app |
Prerequisite: | lp:~carlos-mazieri/ubuntu-filemanager-app/samba-browsing-09 |
Diff against target: |
593 lines (+280/-129) 10 files modified
src/plugin/folderlistmodel/dirmodel.cpp (+17/-0) src/plugin/test_folderlistmodel/simpleUI/actionprogress.cpp (+0/-48) src/plugin/test_folderlistmodel/simpleUI/actionprogress.h (+0/-43) src/plugin/test_folderlistmodel/simpleUI/authenticationdialog.ui (+174/-0) src/plugin/test_folderlistmodel/simpleUI/placesmodel.cpp (+2/-0) src/plugin/test_folderlistmodel/simpleUI/res.qrc (+3/-0) src/plugin/test_folderlistmodel/simpleUI/simplelist.cpp (+18/-6) src/plugin/test_folderlistmodel/simpleUI/simplelist.h (+10/-6) src/plugin/test_folderlistmodel/simpleUI/simpleslots.cpp (+49/-17) src/plugin/test_folderlistmodel/simpleUI/simpleui.pro (+7/-9) |
To merge this branch: | bzr merge lp:~carlos-mazieri/ubuntu-filemanager-app/samba-browsing-10 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Arto Jalkanen | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+252981@code.launchpad.net |
Commit message
C++ UI test updated
Description of the change
Updated C++ simple view to test Samba browsing and authentication.
To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
review:
Approve
(continuous-integration)
Revision history for this message
Arto Jalkanen (ajalkane) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/plugin/folderlistmodel/dirmodel.cpp' |
2 | --- src/plugin/folderlistmodel/dirmodel.cpp 2015-03-14 19:33:43 +0000 |
3 | +++ src/plugin/folderlistmodel/dirmodel.cpp 2015-03-14 19:33:43 +0000 |
4 | @@ -296,6 +296,23 @@ |
5 | { |
6 | icon = QFileIconProvider().icon(mDirectoryContents.at(index.row()).diskFileInfo()); |
7 | } |
8 | +#if defined(SIMPLE_UI) |
9 | + else |
10 | + if (mDirectoryContents.at(index.row()).isHost()) |
11 | + { |
12 | + return QIcon(":/resources/resources/server.png"); |
13 | + } |
14 | + else |
15 | + if (mDirectoryContents.at(index.row()).isWorkGroup()) |
16 | + { |
17 | + return QIcon(":/resources/resources/workgroup.png"); |
18 | + } |
19 | + else |
20 | + if (mDirectoryContents.at(index.row()).isShare()) |
21 | + { |
22 | + return QIcon(":/resources/resources/samba_folder.png"); |
23 | + } |
24 | +#endif |
25 | else |
26 | if (mDirectoryContents.at(index.row()).isDir()) |
27 | { |
28 | |
29 | === removed file 'src/plugin/test_folderlistmodel/simpleUI/actionprogress.cpp' |
30 | --- src/plugin/test_folderlistmodel/simpleUI/actionprogress.cpp 2014-12-30 18:23:15 +0000 |
31 | +++ src/plugin/test_folderlistmodel/simpleUI/actionprogress.cpp 1970-01-01 00:00:00 +0000 |
32 | @@ -1,48 +0,0 @@ |
33 | -/************************************************************************** |
34 | - * |
35 | - * Copyright 2014 Canonical Ltd. |
36 | - * Copyright 2014 Carlos J Mazieri <carlos.mazieri@gmail.com> |
37 | - * |
38 | - * This program is free software; you can redistribute it and/or modify |
39 | - * it under the terms of the GNU Lesser General Public License as published by |
40 | - * the Free Software Foundation; version 3. |
41 | - * |
42 | - * This program is distributed in the hope that it will be useful, |
43 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
44 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
45 | - * GNU Lesser General Public License for more details. |
46 | - * |
47 | - * You should have received a copy of the GNU Lesser General Public License |
48 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
49 | - * |
50 | - * File: actionprogress.cpp |
51 | - * Date: 30/12/2014 |
52 | - */ |
53 | - |
54 | -#include "actionprogress.h" |
55 | -#include <QProgressBar> |
56 | -#include <QPushButton> |
57 | -#include <QVBoxLayout> |
58 | - |
59 | -ActionProgress::ActionProgress(QWidget *parent) :QDialog(parent) |
60 | -{ |
61 | - m_pbar = new QProgressBar(this); |
62 | - m_pbar->setMaximum(100); |
63 | - m_pbar->setMinimum(0); |
64 | - QPushButton *btn = new QPushButton("Cancel", this); |
65 | - connect(btn, SIGNAL(clicked()), this, SIGNAL(cancel())); |
66 | - QVBoxLayout *layout = new QVBoxLayout(this); |
67 | - layout->addWidget(m_pbar); |
68 | - layout->addWidget(btn); |
69 | -} |
70 | - |
71 | - |
72 | -void ActionProgress::setValue(int v ) |
73 | -{ |
74 | - m_pbar->setValue(v); |
75 | -} |
76 | - |
77 | -void ActionProgress::reset() |
78 | -{ |
79 | - m_pbar->reset(); |
80 | -} |
81 | |
82 | === removed file 'src/plugin/test_folderlistmodel/simpleUI/actionprogress.h' |
83 | --- src/plugin/test_folderlistmodel/simpleUI/actionprogress.h 2014-12-30 18:23:15 +0000 |
84 | +++ src/plugin/test_folderlistmodel/simpleUI/actionprogress.h 1970-01-01 00:00:00 +0000 |
85 | @@ -1,43 +0,0 @@ |
86 | -/************************************************************************** |
87 | - * |
88 | - * Copyright 2014 Canonical Ltd. |
89 | - * Copyright 2014 Carlos J Mazieri <carlos.mazieri@gmail.com> |
90 | - * |
91 | - * This program is free software; you can redistribute it and/or modify |
92 | - * it under the terms of the GNU Lesser General Public License as published by |
93 | - * the Free Software Foundation; version 3. |
94 | - * |
95 | - * This program is distributed in the hope that it will be useful, |
96 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
97 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
98 | - * GNU Lesser General Public License for more details. |
99 | - * |
100 | - * You should have received a copy of the GNU Lesser General Public License |
101 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
102 | - * |
103 | - * File: actionprogress.h |
104 | - * Date: 30/12/2014 |
105 | - */ |
106 | - |
107 | -#ifndef ACTIONPROGRESS_H |
108 | -#define ACTIONPROGRESS_H |
109 | - |
110 | -#include <QDialog> |
111 | - |
112 | -class QProgressBar; |
113 | - |
114 | -class ActionProgress : public QDialog |
115 | -{ |
116 | - Q_OBJECT |
117 | -public: |
118 | - ActionProgress(QWidget *parent = 0); |
119 | -signals: |
120 | - void cancel(); |
121 | -public slots: |
122 | - void setValue(int v); |
123 | - void reset() ; |
124 | -private: |
125 | - QProgressBar * m_pbar; |
126 | -}; |
127 | - |
128 | -#endif // ACTIONPROGRESS_H |
129 | |
130 | === added file 'src/plugin/test_folderlistmodel/simpleUI/authenticationdialog.ui' |
131 | --- src/plugin/test_folderlistmodel/simpleUI/authenticationdialog.ui 1970-01-01 00:00:00 +0000 |
132 | +++ src/plugin/test_folderlistmodel/simpleUI/authenticationdialog.ui 2015-03-14 19:33:43 +0000 |
133 | @@ -0,0 +1,174 @@ |
134 | +<?xml version="1.0" encoding="UTF-8"?> |
135 | +<ui version="4.0"> |
136 | + <class>AuthenticationDialog</class> |
137 | + <widget class="QDialog" name="AuthenticationDialog"> |
138 | + <property name="geometry"> |
139 | + <rect> |
140 | + <x>0</x> |
141 | + <y>0</y> |
142 | + <width>338</width> |
143 | + <height>295</height> |
144 | + </rect> |
145 | + </property> |
146 | + <property name="windowTitle"> |
147 | + <string>Authentication Information</string> |
148 | + </property> |
149 | + <layout class="QVBoxLayout" name="verticalLayout"> |
150 | + <item> |
151 | + <layout class="QGridLayout" name="gridLayout"> |
152 | + <item row="0" column="0"> |
153 | + <widget class="QLabel" name="label_4"> |
154 | + <property name="sizePolicy"> |
155 | + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> |
156 | + <horstretch>0</horstretch> |
157 | + <verstretch>0</verstretch> |
158 | + </sizepolicy> |
159 | + </property> |
160 | + <property name="text"> |
161 | + <string>User</string> |
162 | + </property> |
163 | + </widget> |
164 | + </item> |
165 | + <item row="0" column="1"> |
166 | + <widget class="QComboBox" name="comboBoxUser"> |
167 | + <property name="editable"> |
168 | + <bool>true</bool> |
169 | + </property> |
170 | + <property name="insertPolicy"> |
171 | + <enum>QComboBox::InsertAlphabetically</enum> |
172 | + </property> |
173 | + </widget> |
174 | + </item> |
175 | + <item row="1" column="0"> |
176 | + <widget class="QLabel" name="label_3"> |
177 | + <property name="sizePolicy"> |
178 | + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> |
179 | + <horstretch>0</horstretch> |
180 | + <verstretch>0</verstretch> |
181 | + </sizepolicy> |
182 | + </property> |
183 | + <property name="text"> |
184 | + <string>Password</string> |
185 | + </property> |
186 | + </widget> |
187 | + </item> |
188 | + <item row="1" column="1"> |
189 | + <widget class="QLineEdit" name="lineEditPassword"> |
190 | + <property name="echoMode"> |
191 | + <enum>QLineEdit::PasswordEchoOnEdit</enum> |
192 | + </property> |
193 | + </widget> |
194 | + </item> |
195 | + </layout> |
196 | + </item> |
197 | + <item> |
198 | + <spacer name="verticalSpacer"> |
199 | + <property name="orientation"> |
200 | + <enum>Qt::Vertical</enum> |
201 | + </property> |
202 | + <property name="sizeType"> |
203 | + <enum>QSizePolicy::Minimum</enum> |
204 | + </property> |
205 | + <property name="sizeHint" stdset="0"> |
206 | + <size> |
207 | + <width>20</width> |
208 | + <height>50</height> |
209 | + </size> |
210 | + </property> |
211 | + </spacer> |
212 | + </item> |
213 | + <item> |
214 | + <layout class="QHBoxLayout" name="horizontalLayout"> |
215 | + <item> |
216 | + <widget class="QLabel" name="label"> |
217 | + <property name="sizePolicy"> |
218 | + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> |
219 | + <horstretch>0</horstretch> |
220 | + <verstretch>0</verstretch> |
221 | + </sizepolicy> |
222 | + </property> |
223 | + <property name="text"> |
224 | + <string>Url</string> |
225 | + </property> |
226 | + </widget> |
227 | + </item> |
228 | + <item> |
229 | + <widget class="QLineEdit" name="lineEditUrl"> |
230 | + <property name="readOnly"> |
231 | + <bool>true</bool> |
232 | + </property> |
233 | + </widget> |
234 | + </item> |
235 | + </layout> |
236 | + </item> |
237 | + <item> |
238 | + <widget class="QCheckBox" name="checkBox"> |
239 | + <property name="text"> |
240 | + <string>Save Password</string> |
241 | + </property> |
242 | + </widget> |
243 | + </item> |
244 | + <item> |
245 | + <spacer name="verticalSpacer_2"> |
246 | + <property name="orientation"> |
247 | + <enum>Qt::Vertical</enum> |
248 | + </property> |
249 | + <property name="sizeType"> |
250 | + <enum>QSizePolicy::Minimum</enum> |
251 | + </property> |
252 | + <property name="sizeHint" stdset="0"> |
253 | + <size> |
254 | + <width>20</width> |
255 | + <height>50</height> |
256 | + </size> |
257 | + </property> |
258 | + </spacer> |
259 | + </item> |
260 | + <item> |
261 | + <widget class="QDialogButtonBox" name="buttonBox"> |
262 | + <property name="orientation"> |
263 | + <enum>Qt::Horizontal</enum> |
264 | + </property> |
265 | + <property name="standardButtons"> |
266 | + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
267 | + </property> |
268 | + </widget> |
269 | + </item> |
270 | + </layout> |
271 | + </widget> |
272 | + <resources/> |
273 | + <connections> |
274 | + <connection> |
275 | + <sender>buttonBox</sender> |
276 | + <signal>accepted()</signal> |
277 | + <receiver>AuthenticationDialog</receiver> |
278 | + <slot>accept()</slot> |
279 | + <hints> |
280 | + <hint type="sourcelabel"> |
281 | + <x>248</x> |
282 | + <y>254</y> |
283 | + </hint> |
284 | + <hint type="destinationlabel"> |
285 | + <x>157</x> |
286 | + <y>274</y> |
287 | + </hint> |
288 | + </hints> |
289 | + </connection> |
290 | + <connection> |
291 | + <sender>buttonBox</sender> |
292 | + <signal>rejected()</signal> |
293 | + <receiver>AuthenticationDialog</receiver> |
294 | + <slot>reject()</slot> |
295 | + <hints> |
296 | + <hint type="sourcelabel"> |
297 | + <x>316</x> |
298 | + <y>260</y> |
299 | + </hint> |
300 | + <hint type="destinationlabel"> |
301 | + <x>286</x> |
302 | + <y>274</y> |
303 | + </hint> |
304 | + </hints> |
305 | + </connection> |
306 | + </connections> |
307 | +</ui> |
308 | |
309 | === modified file 'src/plugin/test_folderlistmodel/simpleUI/placesmodel.cpp' |
310 | --- src/plugin/test_folderlistmodel/simpleUI/placesmodel.cpp 2014-08-13 15:25:21 +0000 |
311 | +++ src/plugin/test_folderlistmodel/simpleUI/placesmodel.cpp 2015-03-14 19:33:43 +0000 |
312 | @@ -49,6 +49,8 @@ |
313 | addPlace("Root", ":/resources/resources/red_folder.png", QStringList(QDir::rootPath())); |
314 | |
315 | addPlace("Trash", ":/resources/resources/recyclebin_full.png", QStringList(LocationUrl::TrashRootURL)); |
316 | + |
317 | + addPlace("samba/cifs", ":/resources/resources/workgroup.png", QStringList(LocationUrl::SmbURL)); |
318 | } |
319 | |
320 | |
321 | |
322 | === modified file 'src/plugin/test_folderlistmodel/simpleUI/res.qrc' |
323 | --- src/plugin/test_folderlistmodel/simpleUI/res.qrc 2014-08-13 15:25:21 +0000 |
324 | +++ src/plugin/test_folderlistmodel/simpleUI/res.qrc 2015-03-14 19:33:43 +0000 |
325 | @@ -19,5 +19,8 @@ |
326 | <file>resources/red_folder.png</file> |
327 | <file>resources/document_folder.png</file> |
328 | <file>resources/downloads_folder.png</file> |
329 | + <file>resources/server.png</file> |
330 | + <file>resources/workgroup.png</file> |
331 | + <file>resources/samba_folder.png</file> |
332 | </qresource> |
333 | </RCC> |
334 | |
335 | === added file 'src/plugin/test_folderlistmodel/simpleUI/resources/samba_folder.png' |
336 | Binary files src/plugin/test_folderlistmodel/simpleUI/resources/samba_folder.png 1970-01-01 00:00:00 +0000 and src/plugin/test_folderlistmodel/simpleUI/resources/samba_folder.png 2015-03-14 19:33:43 +0000 differ |
337 | === added file 'src/plugin/test_folderlistmodel/simpleUI/resources/server.png' |
338 | Binary files src/plugin/test_folderlistmodel/simpleUI/resources/server.png 1970-01-01 00:00:00 +0000 and src/plugin/test_folderlistmodel/simpleUI/resources/server.png 2015-03-14 19:33:43 +0000 differ |
339 | === added file 'src/plugin/test_folderlistmodel/simpleUI/resources/workgroup.png' |
340 | Binary files src/plugin/test_folderlistmodel/simpleUI/resources/workgroup.png 1970-01-01 00:00:00 +0000 and src/plugin/test_folderlistmodel/simpleUI/resources/workgroup.png 2015-03-14 19:33:43 +0000 differ |
341 | === modified file 'src/plugin/test_folderlistmodel/simpleUI/simplelist.cpp' |
342 | --- src/plugin/test_folderlistmodel/simpleUI/simplelist.cpp 2014-12-30 18:23:15 +0000 |
343 | +++ src/plugin/test_folderlistmodel/simpleUI/simplelist.cpp 2015-03-14 19:33:43 +0000 |
344 | @@ -24,7 +24,7 @@ |
345 | #include "dirmodel.h" |
346 | #include "dirselection.h" |
347 | #include "placesmodel.h" |
348 | -#include "actionprogress.h" |
349 | +#include "ui_authenticationdialog.h" |
350 | |
351 | #include <QDir> |
352 | #include <QMetaType> |
353 | @@ -35,21 +35,28 @@ |
354 | #include <QTimer> |
355 | #include <QLineEdit> |
356 | #include <QMouseEvent> |
357 | +#include <QDialog> |
358 | |
359 | SimpleList::SimpleList(QWidget *parent) : |
360 | QMainWindow(parent), |
361 | ui(new Ui::SimpleList), |
362 | - m_pbar( new ActionProgress(this) ), |
363 | + m_pbar( new QProgressBar() ), |
364 | m_selection(0), |
365 | m_holdingCtrlKey(false), |
366 | m_holdingShiftKey(false), |
367 | m_button(Qt::NoButton), |
368 | - m_placesModel(new PlacesModel(this)) |
369 | + m_placesModel(new PlacesModel(this)), |
370 | + m_authDialog(new QDialog(this)), |
371 | + m_uiAuth(new Ui::AuthenticationDialog) |
372 | { |
373 | //prepare UI |
374 | ui->setupUi(this); |
375 | + m_uiAuth->setupUi(m_authDialog); |
376 | + |
377 | ui->tableViewFM->horizontalHeader()->setSortIndicator(0,Qt::AscendingOrder); |
378 | resize(1200,600); |
379 | + m_pbar->setMaximum(100); |
380 | + m_pbar->setMinimum(0); |
381 | |
382 | ui->listViewPlaces->setModel(m_placesModel); |
383 | ui->listViewPlaces->setSpacing(ui->listViewPlaces->spacing() + 7); |
384 | @@ -87,7 +94,7 @@ |
385 | do_connections(); |
386 | |
387 | //start browsing home |
388 | - m_model->goHome(); |
389 | + m_model->goHome(); |
390 | } |
391 | |
392 | |
393 | @@ -158,7 +165,13 @@ |
394 | this, SLOT(onError(QString,QString))); |
395 | |
396 | connect(m_model, SIGNAL(awaitingResultsChanged()), |
397 | - this, SLOT(onStatusChanged())); |
398 | + this, SLOT(onAwaitingResultsChanged())); |
399 | + |
400 | + connect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)), |
401 | + this, SLOT(onRowsInserted(QModelIndex,int,int))); |
402 | + |
403 | + connect(m_model, SIGNAL(needsAuthentication(QString,QString)), |
404 | + this, SLOT(onNeedsAutentication(QString, QString))); |
405 | |
406 | connect(m_selection, SIGNAL(selectionChanged(int)), |
407 | this, SLOT(onSelectionChanged(int))); |
408 | @@ -166,7 +179,6 @@ |
409 | connect(ui->listViewPlaces, SIGNAL(clicked(QModelIndex)), |
410 | this, SLOT(onPlacesClicked(QModelIndex))); |
411 | |
412 | - connect(m_pbar, SIGNAL(cancel()), this, SLOT(onCancelAction())); |
413 | } |
414 | |
415 | //=================================================================== |
416 | |
417 | === modified file 'src/plugin/test_folderlistmodel/simpleUI/simplelist.h' |
418 | --- src/plugin/test_folderlistmodel/simpleUI/simplelist.h 2014-12-30 18:23:15 +0000 |
419 | +++ src/plugin/test_folderlistmodel/simpleUI/simplelist.h 2015-03-14 19:33:43 +0000 |
420 | @@ -29,13 +29,13 @@ |
421 | class QProgressBar; |
422 | class DirSelection; |
423 | class PlacesModel; |
424 | -class ActionProgress; |
425 | +class QDialog; |
426 | |
427 | namespace Ui { |
428 | - class SimpleList; |
429 | +class SimpleList; |
430 | +class AuthenticationDialog; |
431 | } |
432 | |
433 | - |
434 | class SimpleList : public QMainWindow |
435 | { |
436 | Q_OBJECT |
437 | @@ -55,12 +55,14 @@ |
438 | private: |
439 | Ui::SimpleList *ui; |
440 | DirModel *m_model; |
441 | - ActionProgress * m_pbar; |
442 | + QProgressBar * m_pbar; |
443 | DirSelection * m_selection; |
444 | bool m_holdingCtrlKey; |
445 | bool m_holdingShiftKey; |
446 | Qt::MouseButton m_button; |
447 | PlacesModel * m_placesModel; |
448 | + QDialog * m_authDialog; |
449 | + Ui::AuthenticationDialog *m_uiAuth; |
450 | |
451 | private slots: |
452 | void onNewDir(); |
453 | @@ -77,8 +79,10 @@ |
454 | void onSelectionChanged(int); |
455 | void onPlacesClicked(QModelIndex); |
456 | void onOpenTerminal(); |
457 | - void onCancelAction(); |
458 | - void onStatusChanged(); |
459 | + void onAwaitingResultsChanged(); |
460 | + void onRowsInserted(QModelIndex, int,int); |
461 | + void onNeedsAutentication(QString, QString); |
462 | + void onAuthenticaionAccepted(); |
463 | }; |
464 | |
465 | #endif // SIMPLELIST_H |
466 | |
467 | === modified file 'src/plugin/test_folderlistmodel/simpleUI/simpleslots.cpp' |
468 | --- src/plugin/test_folderlistmodel/simpleUI/simpleslots.cpp 2014-12-30 18:23:15 +0000 |
469 | +++ src/plugin/test_folderlistmodel/simpleUI/simpleslots.cpp 2015-03-14 19:33:43 +0000 |
470 | @@ -26,7 +26,7 @@ |
471 | #include "dirselection.h" |
472 | #include "placesmodel.h" |
473 | #include "terminalfolderapp.h" |
474 | -#include "actionprogress.h" |
475 | +#include "ui_authenticationdialog.h" |
476 | |
477 | #include <QDir> |
478 | #include <QMetaType> |
479 | @@ -37,6 +37,7 @@ |
480 | #include <QTimer> |
481 | #include <QLineEdit> |
482 | #include <QMouseEvent> |
483 | +#include <QDialog> |
484 | |
485 | |
486 | void SimpleList::onRowClicked(QModelIndex index) |
487 | @@ -81,24 +82,13 @@ |
488 | void SimpleList::onClipboardChanged() |
489 | { |
490 | int clipboardCounter = m_model->getClipboardUrlsCounter(); |
491 | - int rows = m_model->rowCount(); |
492 | - statusBar()->showMessage(QString("Total Items = %1 Clipboard Items = %2") |
493 | - .arg(rows) |
494 | + statusBar()->showMessage(QString("clipboard items %1") |
495 | .arg(clipboardCounter) |
496 | ); |
497 | ui->actionPaste->setEnabled(clipboardCounter > 0); |
498 | } |
499 | |
500 | |
501 | -void SimpleList::onStatusChanged() |
502 | -{ |
503 | - if (!m_model->awaitingResults()) |
504 | - { |
505 | - onClipboardChanged(); |
506 | - } |
507 | -} |
508 | - |
509 | - |
510 | void SimpleList::onProgress(int cur, int total, int percent) |
511 | { |
512 | QString p; |
513 | @@ -195,8 +185,50 @@ |
514 | } |
515 | |
516 | |
517 | -void SimpleList::onCancelAction() |
518 | -{ |
519 | - m_model->cancelAction(); |
520 | - m_pbar->hide(); |
521 | +void SimpleList::onAwaitingResultsChanged() |
522 | +{ |
523 | + if (m_model->awaitingResults()) |
524 | + { |
525 | + this->setCursor(Qt::BusyCursor); |
526 | + } |
527 | + else |
528 | + { |
529 | + this->setCursor(Qt::ArrowCursor); |
530 | + } |
531 | +} |
532 | + |
533 | + |
534 | +void SimpleList::onRowsInserted(QModelIndex, int, int) |
535 | +{ |
536 | + ui->tableViewFM->resizeColumnToContents(0); |
537 | +} |
538 | + |
539 | + |
540 | +void SimpleList::onNeedsAutentication(QString user, QString url) |
541 | +{ |
542 | + m_uiAuth->lineEditUrl->setText(url); |
543 | + int index = m_uiAuth->comboBoxUser->findText(user); |
544 | + if (index == -1) |
545 | + { |
546 | + m_uiAuth->comboBoxUser->addItem(user); |
547 | + index = m_uiAuth->comboBoxUser->findText(user); |
548 | + } |
549 | + if (index != -1) |
550 | + { |
551 | + m_uiAuth->comboBoxUser->setCurrentIndex(index); |
552 | + } |
553 | + m_uiAuth->checkBox->setChecked(false); |
554 | + if (m_authDialog->exec() == QDialog::Accepted) |
555 | + { |
556 | + QTimer::singleShot(0, this, SLOT(onAuthenticaionAccepted())); |
557 | + } |
558 | +} |
559 | + |
560 | + |
561 | +void SimpleList::onAuthenticaionAccepted() |
562 | +{ |
563 | + m_model->setPath( m_uiAuth->lineEditUrl->text(), |
564 | + m_uiAuth->comboBoxUser->currentText(), |
565 | + m_uiAuth->lineEditPassword->text(), |
566 | + m_uiAuth->checkBox->isChecked() ); |
567 | } |
568 | |
569 | === modified file 'src/plugin/test_folderlistmodel/simpleUI/simpleui.pro' |
570 | --- src/plugin/test_folderlistmodel/simpleUI/simpleui.pro 2014-12-30 18:23:15 +0000 |
571 | +++ src/plugin/test_folderlistmodel/simpleUI/simpleui.pro 2015-03-14 19:33:43 +0000 |
572 | @@ -13,15 +13,13 @@ |
573 | |
574 | TEMPLATE = app |
575 | |
576 | -DEFINES += REGRESSION_TEST_FOLDERLISTMODEL |
577 | - |
578 | -SOURCES += main.cpp simplelist.cpp simpleslots.cpp placesmodel.cpp terminalfolderapp.cpp \ |
579 | - actionprogress.cpp |
580 | - |
581 | -HEADERS += simplelist.h placesmodel.h terminalfolderapp.h \ |
582 | - actionprogress.h |
583 | - |
584 | -FORMS += simplelist.ui |
585 | +DEFINES += REGRESSION_TEST_FOLDERLISTMODEL SIMPLE_UI |
586 | + |
587 | +SOURCES += main.cpp simplelist.cpp simpleslots.cpp placesmodel.cpp terminalfolderapp.cpp |
588 | + |
589 | +HEADERS += simplelist.h placesmodel.h terminalfolderapp.h |
590 | + |
591 | +FORMS += simplelist.ui authenticationdialog.ui |
592 | |
593 | include (../../folderlistmodel/folderlistmodel.pri) |
594 |
PASSED: Continuous integration, rev:397 91.189. 93.70:8080/ job/ubuntu- filemanager- app-ci/ 482/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic/ 2348 91.189. 93.70:8080/ job/generic- mediumtests- utopic/ 2348/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/ubuntu- filemanager- app-utopic- amd64-ci/ 198 91.189. 93.70:8080/ job/ubuntu- filemanager- app-vivid- amd64-ci/ 104
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- filemanager- app-ci/ 482/rebuild
http://