mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
generic: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
2970cad3e9
commit
e5be0d5a2a
2 changed files with 20 additions and 19 deletions
|
@ -382,7 +382,7 @@ void KIconLoader::reconfigure(const QString &_appname, KStandardDirs *_dirs)
|
||||||
d->init(_appname, _dirs);
|
d->init(_appname, _dirs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KIconLoaderPrivate::init( const QString &_appname, KStandardDirs *_dirs)
|
void KIconLoaderPrivate::init(const QString &_appname, KStandardDirs *_dirs)
|
||||||
{
|
{
|
||||||
extraDesktopIconsLoaded = false;
|
extraDesktopIconsLoaded = false;
|
||||||
mIconThemeInited = false;
|
mIconThemeInited = false;
|
||||||
|
@ -1391,14 +1391,14 @@ QPixmap KIconLoader::unknown()
|
||||||
/*** the global icon loader ***/
|
/*** the global icon loader ***/
|
||||||
K_GLOBAL_STATIC_WITH_ARGS(KIconLoader, globalIconLoader, (KGlobal::mainComponent(), 0))
|
K_GLOBAL_STATIC_WITH_ARGS(KIconLoader, globalIconLoader, (KGlobal::mainComponent(), 0))
|
||||||
|
|
||||||
KIconLoader *KIconLoader::global()
|
KIconLoader* KIconLoader::global()
|
||||||
{
|
{
|
||||||
return globalIconLoader;
|
return globalIconLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KIconLoader::newIconLoader()
|
void KIconLoader::newIconLoader()
|
||||||
{
|
{
|
||||||
if ( global() == this) {
|
if (global() == this) {
|
||||||
KIconTheme::reconfigure();
|
KIconTheme::reconfigure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -453,9 +453,7 @@ void CopyJobPrivate::sourceStated(const UDSEntry& entry, const KUrl& sourceUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
startListing( sourceUrl );
|
startListing( sourceUrl );
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//kDebug(7007) << "Source is a file (or a symlink), or we are linking -> no recursive listing";
|
//kDebug(7007) << "Source is a file (or a symlink), or we are linking -> no recursive listing";
|
||||||
|
|
||||||
if (sourceUrl.isLocalFile()) {
|
if (sourceUrl.isLocalFile()) {
|
||||||
|
@ -552,13 +550,13 @@ void CopyJobPrivate::slotEntries(KIO::Job* job, const UDSEntryList& list)
|
||||||
|
|
||||||
void CopyJobPrivate::slotSubError(ListJob* job, ListJob* subJob)
|
void CopyJobPrivate::slotSubError(ListJob* job, ListJob* subJob)
|
||||||
{
|
{
|
||||||
const KUrl url = subJob->url();
|
const KUrl url = subJob->url();
|
||||||
kWarning() << url << subJob->errorString();
|
kWarning() << url << subJob->errorString();
|
||||||
|
|
||||||
Q_Q(CopyJob);
|
Q_Q(CopyJob);
|
||||||
|
|
||||||
emit q->warning(job, subJob->errorString(), QString());
|
emit q->warning(job, subJob->errorString(), QString());
|
||||||
skip(url, true);
|
skip(url, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -587,7 +585,7 @@ void CopyJobPrivate::addCopyInfoFromUDSEntry(const UDSEntry& entry, const KUrl&
|
||||||
// Make URL from displayName
|
// Make URL from displayName
|
||||||
url = srcUrl;
|
url = srcUrl;
|
||||||
if (srcIsDir) { // Only if src is a directory. Otherwise uSource is fine as is
|
if (srcIsDir) { // Only if src is a directory. Otherwise uSource is fine as is
|
||||||
//kDebug(7007) << "adding path" << displayName;
|
// kDebug(7007) << "adding path" << displayName;
|
||||||
url.addPath(fileName);
|
url.addPath(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -606,7 +604,7 @@ void CopyJobPrivate::addCopyInfoFromUDSEntry(const UDSEntry& entry, const KUrl&
|
||||||
KProtocolInfo::FileNameUsedForCopying fnu = KProtocolManager::fileNameUsedForCopying(url);
|
KProtocolInfo::FileNameUsedForCopying fnu = KProtocolManager::fileNameUsedForCopying(url);
|
||||||
if (hasCustomURL &&
|
if (hasCustomURL &&
|
||||||
fnu == KProtocolInfo::FromUrl) {
|
fnu == KProtocolInfo::FromUrl) {
|
||||||
//destFileName = url.fileName(); // Doesn't work for recursive listing
|
// destFileName = url.fileName(); // Doesn't work for recursive listing
|
||||||
// Count the number of prefixes used by the recursive listjob
|
// Count the number of prefixes used by the recursive listjob
|
||||||
int numberOfSlashes = fileName.count('/'); // don't make this a find()!
|
int numberOfSlashes = fileName.count('/'); // don't make this a find()!
|
||||||
QString path = url.path();
|
QString path = url.path();
|
||||||
|
@ -622,9 +620,11 @@ void CopyJobPrivate::addCopyInfoFromUDSEntry(const UDSEntry& entry, const KUrl&
|
||||||
destFileName = path.mid(pos + 1);
|
destFileName = path.mid(pos + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ( fnu == KProtocolInfo::Name ) { // destination filename taken from UDS_NAME
|
} else if (fnu == KProtocolInfo::Name) {
|
||||||
|
// destination filename taken from UDS_NAME
|
||||||
destFileName = fileName;
|
destFileName = fileName;
|
||||||
} else { // from display name (with fallback to name)
|
} else {
|
||||||
|
// from display name (with fallback to name)
|
||||||
const QString displayName = entry.stringValue(KIO::UDSEntry::UDS_DISPLAY_NAME);
|
const QString displayName = entry.stringValue(KIO::UDSEntry::UDS_DISPLAY_NAME);
|
||||||
destFileName = displayName.isEmpty() ? fileName : displayName;
|
destFileName = displayName.isEmpty() ? fileName : displayName;
|
||||||
}
|
}
|
||||||
|
@ -636,12 +636,13 @@ void CopyJobPrivate::addCopyInfoFromUDSEntry(const UDSEntry& entry, const KUrl&
|
||||||
destFileName = KIO::encodeFileName(info.uSource.prettyUrl());
|
destFileName = KIO::encodeFileName(info.uSource.prettyUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
//kDebug(7007) << " adding destFileName=" << destFileName;
|
// kDebug(7007) << " adding destFileName=" << destFileName;
|
||||||
info.uDest.addPath(destFileName);
|
info.uDest.addPath(destFileName);
|
||||||
}
|
}
|
||||||
//kDebug(7007) << " uDest(2)=" << info.uDest;
|
// kDebug(7007) << " uDest(2)=" << info.uDest;
|
||||||
//kDebug(7007) << " " << info.uSource << "->" << info.uDest;
|
// kDebug(7007) << " " << info.uSource << "->" << info.uDest;
|
||||||
if (info.linkDest.isEmpty() && isDir && m_mode != CopyJob::Link) { // Dir
|
if (info.linkDest.isEmpty() && isDir && m_mode != CopyJob::Link) {
|
||||||
|
// Dir
|
||||||
dirs.append(info); // Directories
|
dirs.append(info); // Directories
|
||||||
if (m_mode == CopyJob::Move) {
|
if (m_mode == CopyJob::Move) {
|
||||||
dirsToRemove.append(info.uSource);
|
dirsToRemove.append(info.uSource);
|
||||||
|
|
Loading…
Add table
Reference in a new issue