┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Trueg <[email protected]>2010-01-26 09:25:22 +0000
committerSebastian Trueg <[email protected]>2010-01-26 09:25:22 +0000
commit950d3ad78bc7403be701936e3838d142c920d643 (patch)
treeeb130db86da80d44cd8d0f2a1f843900217bb748
parent6c326f9962b9664ac601640bf8cc49b50c046c27 (diff)
* Do not hide the parent folder since we can now browse into it by simply clicking the link.
* Fixed index bug which caused the last information item to be deleted. * Why make merge-sort more complicated than it is? ;) svn path=/trunk/KDE/kdebase/apps/; revision=1080377
-rw-r--r--src/panels/information/kmetadatawidget.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/panels/information/kmetadatawidget.cpp b/src/panels/information/kmetadatawidget.cpp
index 5ac64a957..a17a0fd8f 100644
--- a/src/panels/information/kmetadatawidget.cpp
+++ b/src/panels/information/kmetadatawidget.cpp
@@ -267,7 +267,7 @@ void KMetaDataWidget::Private::setRowVisible(QWidget* infoWidget, bool visible)
void KMetaDataWidget::Private::initMetaInfoSettings()
{
- const int currentVersion = 1; // increase version, if the blacklist of disabled
+ const int currentVersion = 2; // increase version, if the blacklist of disabled
// properties should be updated
KConfig config("kmetainformationrc", KConfig::NoGlobals);
@@ -283,7 +283,7 @@ void KMetaDataWidget::Private::initMetaInfoSettings()
static const char* const disabledProperties[] = {
"asText", "contentSize", "created", "depth", "description", "fileExtension",
- "fileName", "fileSize", "hasTag", "isPartOf", "lastModified", "mimeType", "name",
+ "fileName", "fileSize", "hasTag", "lastModified", "mimeType", "name",
"numericRating", "parentUrl", "permissions", "plainTextContent", "owner",
"sourceModified", "url",
0 // mandatory last entry
@@ -410,7 +410,7 @@ void KMetaDataWidget::Private::slotLoadingFinished()
}
// remove rows that are not needed anymore
- for (int i = m_rows.count() - 1; i >= index; --i) {
+ for (int i = m_rows.count() - 1; i > index; --i) {
delete m_rows[i].label;
delete m_rows[i].infoWidget;
m_rows.pop_back();
@@ -507,19 +507,12 @@ QList<KLoadMetaDataThread::Item>
height = item;
} else {
// insert the item sorted by the label
- bool inserted = false;
- int i = 0;
- const int count = mergedItems.count();
- while (!inserted && (i < count)) {
- if (item.label < mergedItems[i].label) {
- mergedItems.insert(i, item);
- inserted = true;
- }
- ++i;
- }
- if (!inserted) {
- mergedItems.append(item);
+ int pos = 0;
+ while ( mergedItems.count() > pos &&
+ mergedItems[pos].label < item.label ) {
+ ++pos;
}
+ mergedItems.insert( pos, item );
}
}