[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/nepomuk
From: Sebastian Trueg <sebastian () trueg ! de>
Date: 2010-09-14 13:44:51
Message-ID: 20100914134451.E3172AC871 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1175221 by trueg:
Format URLs using KUrl::pathOrUrl()
M +6 -6 core/resource.cpp
M +4 -0 utils/global.cpp
--- trunk/KDE/kdelibs/nepomuk/core/resource.cpp #1175220:1175221
@@ -33,8 +33,10 @@
#include "nco.h"
#include "nuao.h"
-#include <klocale.h>
-#include <kdebug.h>
+#include "klocale.h"
+#include "kdebug.h"
+#include "kurl.h"
+#include "kmimetype.h"
#include <Soprano/Vocabulary/NAO>
#include <Soprano/Vocabulary/Xesam>
@@ -42,9 +44,7 @@
#include <Soprano/Model>
#include <Soprano/QueryResultIterator>
-#include <kmimetype.h>
-
Nepomuk::Resource::Resource()
{
m_data = ResourceManager::instance()->d->data( QUrl(), QUrl() );
@@ -374,14 +374,14 @@
QList<Resource> go = property( \
Vocabulary::PIMO::groundingOccurrence() ).toResourceList(); if( !go.isEmpty() ) {
label = go.first().genericLabel();
- if( label == \
go.first().resourceUri().toString() ) { + \
if( label == KUrl(go.first().resourceUri()).pathOrUrl() ) { label.clear();
}
}
if ( label.isEmpty() ) {
// ugly fallback
- label = resourceUri().toString();
+ label = KUrl(resourceUri()).pathOrUrl();
}
}
}
--- trunk/KDE/kdelibs/nepomuk/utils/global.cpp #1175220:1175221
@@ -111,6 +111,10 @@
valueString = KGlobal::locale()->formatNumber(value.toDouble());
}
+ else if(value.isUrl()) {
+ valueString = KUrl(value.toUrl()).pathOrUrl();
+ }
+
else {
valueString = value.toString();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic