plasmate/packagemodel.cpp
(Diff revision 5)
|
QVariant PackageModel::data(const QModelIndex &index, int role) const |
|
|
188 |
QHashIterator<QString, QStringList> it(m_themeImageDialogOptions); |
unused?
plasmate/packagemodel.cpp
(Diff revision 5)
|
QVariant PackageModel::data(const QModelIndex &index, int role) const |
184 |
if (!qstrcmp(key, "images")) { |
196 |
if (!qstrcmp(key, "images")) { |
185 |
return QStringList("[plasmate]/imageDialog"); |
197 |
return QStringList("[plasmate]/imageDialog"); |
186 |
} else if (!qstrcmp(key, "config")) { |
198 |
} else if (!qstrcmp(key, "config")) { |
187 |
return QStringList("[plasmate]/mainconfigxml/new"); |
199 |
return QStringList("[plasmate]/mainconfigxml/new"); |
188 |
} else { |
200 |
} else if(!qstrcmp(key, "animations") && packageType() != "Plasma/Theme") { |
|
|
201 |
//add an exception. the plasmoid package also contains the key animations, |
|
|
202 |
//so if this isn't a theme package return the right mimetype |
189 |
return QStringList("[plasmate]/new"); |
203 |
return QStringList("[plasmate]/new"); |
|
|
204 |
} else if (m_themeImageDialogOptions.contains(key)) { |
|
|
205 |
return m_themeImageDialogOptions.value(key); |
why not add "images", "config" and "animations" to m_themeImageDialogOptions and rename it to m_dialogOptions
plasmate/packagemodel.cpp
(Diff revision 5)
|
QVariant PackageModel::data(const QModelIndex &index, int role) const |
|
|
296 |
if (index.row() + 1 == m_topEntries.count() && packageType() == "Plasma/Theme") { |
|
|
297 |
if (m_package) { |
|
|
298 |
return m_package->path() + contentsWithSubdirRole(index.row()); |
|
|
299 |
} |
should not have anything in here specific to a given package type, in this case "Plasma/Theme".
"Plasma/Theme" should not appear in this file.
- Aaron J.
On November 5th, 2012, 5:51 p.m., Giorgos Tsiapaliokas wrote:
Review request for Plasma.
By Giorgos Tsiapaliokas.
Updated Nov. 5, 2012, 5:51 p.m.
Description
create a new theme package->click on the new
a file dialog should appear but instead a simple edit box appears requesting a new filename.
This patch solves the issue
|
Diffs
- plasmate/editors/editpage.h (5cb3ea6)
- plasmate/editors/editpage.cpp (7e82ff2)
- plasmate/packagemodel.h (efa3001)
- plasmate/packagemodel.cpp (9eb0914)
View Diff
|