mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdecore: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
962b0b0ef1
commit
38107cb5c7
4 changed files with 19 additions and 19 deletions
|
@ -122,7 +122,6 @@ static KMimeType::Ptr findFromMode(const QString &path,
|
|||
}
|
||||
|
||||
/*
|
||||
|
||||
As agreed on the XDG list (and unlike the current shared-mime spec):
|
||||
|
||||
Glob-matching should prefer derived mimetype over base mimetype, and longer matches
|
||||
|
@ -150,7 +149,6 @@ So there's also a fast mode which is:
|
|||
if no glob matches, or if more than one glob matches, use default mimetype and mark as "can be refined".
|
||||
|
||||
*/
|
||||
|
||||
KMimeType::Ptr KMimeType::findByUrlHelper(const KUrl &_url, mode_t mode,
|
||||
bool is_local_file,
|
||||
QIODevice *device,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
extern int servicesDebugArea();
|
||||
|
||||
thread_local KMimeTypeFactory* kMimeTypeFactoryInstance = 0;
|
||||
thread_local KMimeTypeFactory* kMimeTypeFactoryInstance = nullptr;
|
||||
|
||||
KMimeTypeFactory::KMimeTypeFactory()
|
||||
: KSycocaFactory(KST_KMimeTypeFactory)
|
||||
|
@ -41,15 +41,17 @@ KMimeTypeFactory::~KMimeTypeFactory()
|
|||
|
||||
KMimeTypeFactory* KMimeTypeFactory::self()
|
||||
{
|
||||
if (!kMimeTypeFactoryInstance)
|
||||
if (!kMimeTypeFactoryInstance) {
|
||||
kMimeTypeFactoryInstance = new KMimeTypeFactory();
|
||||
}
|
||||
return kMimeTypeFactoryInstance;
|
||||
}
|
||||
|
||||
int KMimeTypeFactory::entryOffset(const QString &mimeTypeName)
|
||||
{
|
||||
if (!sycocaDict())
|
||||
if (!sycocaDict()) {
|
||||
return -1; // Error!
|
||||
}
|
||||
assert(!KSycoca::self()->isBuilding());
|
||||
const int offset = sycocaDict()->find_string(mimeTypeName);
|
||||
return offset;
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
* Not meant to be called at this level
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const QString &, const char *) const
|
||||
{ assert(0); return 0; }
|
||||
{ assert(false); return nullptr; }
|
||||
|
||||
/**
|
||||
* Returns the possible offset for a given mimetype entry.
|
||||
|
|
Loading…
Add table
Reference in a new issue