Changeset View
Changeset View
Standalone View
Standalone View
kcms/kfontinst/thumbnail/FontThumbnail.cpp
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 83 | { | |||
---|---|---|---|---|---|
86 | if(entry && entry->isFile()) | 86 | if(entry && entry->isFile()) | ||
87 | { | 87 | { | ||
88 | delete tempDir; | 88 | delete tempDir; | ||
89 | tempDir=new QTemporaryDir(QDir::tempPath() + "/" KFI_TMP_DIR_PREFIX); | 89 | tempDir=new QTemporaryDir(QDir::tempPath() + "/" KFI_TMP_DIR_PREFIX); | ||
90 | tempDir->setAutoRemove(true); | 90 | tempDir->setAutoRemove(true); | ||
91 | 91 | | |||
92 | ((KArchiveFile *)entry)->copyTo(tempDir->path()); | 92 | ((KArchiveFile *)entry)->copyTo(tempDir->path()); | ||
93 | 93 | | |||
94 | QString mime(db.mimeTypeForFile(tempDir->path()+QLatin1Char('/')+entry->name()).name()); | 94 | QString mime(db.mimeTypeForFile(tempDir->filePath(entry->name())).name()); | ||
95 | 95 | | |||
96 | if(mime=="font/ttf" || mime=="font/otf" || mime=="application/x-font-ttf" || | 96 | if(mime=="font/ttf" || mime=="font/otf" || mime=="application/x-font-ttf" || | ||
97 | mime=="application/x-font-otf" || mime=="application/x-font-type1") | 97 | mime=="application/x-font-otf" || mime=="application/x-font-type1") | ||
98 | { | 98 | { | ||
99 | realPath=tempDir->path()+QLatin1Char('/')+entry->name(); | 99 | realPath=tempDir->filePath(entry->name()); | ||
100 | break; | 100 | break; | ||
101 | } | 101 | } | ||
102 | else | 102 | else | ||
103 | ::unlink(QFile::encodeName(tempDir->path()+QLatin1Char('/')+entry->name()).data()); | 103 | ::unlink(QFile::encodeName(tempDir->filePath(entry->name())).data()); | ||
104 | } | 104 | } | ||
105 | } | 105 | } | ||
106 | } | 106 | } | ||
107 | } | 107 | } | ||
108 | } | 108 | } | ||
109 | } | 109 | } | ||
110 | 110 | | |||
111 | QColor bgnd(Qt::black); | 111 | QColor bgnd(Qt::black); | ||
Show All 14 Lines |