Merge lp:~ajalkane/ubuntu-filemanager-app/carlos-folderlistmodel-qml-fixes into lp:~carlos-mazieri/ubuntu-filemanager-app/model

Proposed by Arto Jalkanen
Status: Merged
Approved by: Carlos Jose Mazieri
Approved revision: 12
Merge reported by: Arto Jalkanen
Merged at revision: not available
Proposed branch: lp:~ajalkane/ubuntu-filemanager-app/carlos-folderlistmodel-qml-fixes
Merge into: lp:~carlos-mazieri/ubuntu-filemanager-app/model
Diff against target: 128 lines (+18/-18)
2 files modified
folderlistmodel/dirmodel.cpp (+7/-7)
folderlistmodel/dirmodel.h (+11/-11)
To merge this branch: bzr merge lp:~ajalkane/ubuntu-filemanager-app/carlos-folderlistmodel-qml-fixes
Reviewer Review Type Date Requested Status
Carlos Jose Mazieri Approve
David Planella (community) Needs Information
Review via email: mp+160195@code.launchpad.net

Description of the change

QML does not have type info, so the functions that can be called
from QML must have unique names. Also a property should not be
Q_INVOKABLE.

To post a comment you must log in.
Revision history for this message
Carlos Jose Mazieri (carlos-mazieri) wrote :

Thank you, it is great, sometimes I forgot about we crating things for QML.

Revision history for this message
David Planella (dpm) wrote :

Hi, thanks a lot for the fix!

On an another MP that has now just landed we've added the code for the plugin to the same source tree as that of the app, so that we can more easily build it and ship the plugin in the same click package. Would you mind using the "Resubmit proposal" link at the top right-hand side of this MP's page to change the target branch to be trunk?

I.e. ~ubuntu-filemanager-dev/ubuntu-filemanager-app/trunk

review: Needs Fixing
Revision history for this message
David Planella (dpm) wrote :

Looking at the date, this seems to be quite an old MP. Has it already been included in the plugin code, and if so, could someone change the status to Merged? Thanks!

review: Needs Information
Revision history for this message
Arto Jalkanen (ajalkane) wrote :

This is okay now, fixing status as merged.

Revision history for this message
Carlos Jose Mazieri (carlos-mazieri) wrote :

It has been already merged, I do not understand why it happens.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'folderlistmodel/dirmodel.cpp'
2--- folderlistmodel/dirmodel.cpp 2013-04-20 18:07:39 +0000
3+++ folderlistmodel/dirmodel.cpp 2013-04-22 19:59:28 +0000
4@@ -561,7 +561,7 @@
5 }
6
7
8-void DirModel::remove(int row)
9+void DirModel::removeIndex(int row)
10 {
11 if (IS_VALID_ROW(row))
12 {
13@@ -575,18 +575,18 @@
14 }
15 }
16
17-void DirModel::remove(const QStringList& items)
18+void DirModel::removePaths(const QStringList& items)
19 {
20 this->rm(items);
21 }
22
23-void DirModel::copy(int row)
24+void DirModel::copyIndex(int row)
25 {
26 if (IS_VALID_ROW(row))
27 {
28 const QFileInfo &fi = mDirectoryContents.at(row);
29 QStringList list(fi.absoluteFilePath());
30- this->copy(list);
31+ this->copyPaths(list);
32 }
33 else
34 {
35@@ -594,13 +594,13 @@
36 }
37 }
38
39-void DirModel::copy(const QStringList &items)
40+void DirModel::copyPaths(const QStringList &items)
41 {
42 m_fsAction->copy(items);
43 }
44
45
46-void DirModel::cut(int row)
47+void DirModel::cutIndex(int row)
48 {
49 if (IS_VALID_ROW(row))
50 {
51@@ -615,7 +615,7 @@
52 }
53
54
55-void DirModel::cut(const QStringList &items)
56+void DirModel::cutPaths(const QStringList &items)
57 {
58 m_fsAction->cut(items);
59 }
60
61=== modified file 'folderlistmodel/dirmodel.h'
62--- folderlistmodel/dirmodel.h 2013-04-20 18:07:39 +0000
63+++ folderlistmodel/dirmodel.h 2013-04-22 19:59:28 +0000
64@@ -162,7 +162,7 @@
65 SortOrder getSortOrder() const;
66
67 Q_PROPERTY(int clipboardUrlsCounter READ getClipboardUrlsCounter NOTIFY clipboardChanged)
68- Q_INVOKABLE int getClipboardUrlsCounter() const;
69+ int getClipboardUrlsCounter() const;
70
71 Q_INVOKABLE QString homePath() const;
72
73@@ -173,45 +173,45 @@
74 Q_INVOKABLE bool cdInto(int row);
75
76 /*!
77- * \brief copy() puts the item pointed by \a row (dir or file) into the clipboard
78+ * \brief copyIndex() puts the item pointed by \a row (dir or file) into the clipboard
79 * \param row points to the item file or directory
80 */
81- Q_INVOKABLE void copy(int row);
82+ Q_INVOKABLE void copyIndex(int row);
83
84 /*!
85- * \brief copy(const QStringList& urls) several items (dirs or files) into the clipboard
86+ * \brief copyPaths(const QStringList& urls) several items (dirs or files) into the clipboard
87 * \param items fullpathnames or names only
88 */
89- Q_INVOKABLE void copy(const QStringList& items);
90+ Q_INVOKABLE void copyPaths(const QStringList& items);
91
92 /*!
93- * \brief cut() puts the item into the clipboard as \ref copy(),
94+ * \brief cutIndex() puts the item into the clipboard as \ref copy(),
95 * mark the item to be removed after \ref paste()
96 * \param row points to the item file or directory
97 */
98- Q_INVOKABLE void cut(int row);
99+ Q_INVOKABLE void cutIndex(int row);
100
101 /*!
102 * \brief cut() puts several items (dirs or files) into the clipboard as \ref copy(),
103 * mark the item to be removed after \ref paste()
104 * \param items fullpathnames or names only
105 */
106- Q_INVOKABLE void cut(const QStringList& items);
107+ Q_INVOKABLE void cutPaths(const QStringList& items);
108
109 /*!
110- * \brief remove() remove a item file or directory
111+ * \brief removeIndex(); remove a item file or directory
112 *
113 * I gets the item indicated by \row and calls \ref rm()
114 *
115 * \param row points to the item to b e removed
116 * \return true if it was possible to remove the item
117 */
118- Q_INVOKABLE void remove(int row);
119+ Q_INVOKABLE void removeIndex(int row);
120
121 /*!
122 * Just calls \ref rm()
123 */
124- Q_INVOKABLE void remove(const QStringList& items);
125+ Q_INVOKABLE void removePaths(const QStringList& items);
126
127
128 public slots:

Subscribers

People subscribed via source and target branches