Changeset View
Changeset View
Standalone View
Standalone View
kcms/kfontinst/viewpart/FontViewPart.cpp
Show First 20 Lines • Show All 311 Lines • ▼ Show 20 Line(s) | 308 | { | |||
---|---|---|---|---|---|
312 | { | 312 | { | ||
313 | delete itsTempDir; | 313 | delete itsTempDir; | ||
314 | itsTempDir=new QTemporaryDir(QDir::tempPath() + "/" KFI_TMP_DIR_PREFIX); | 314 | itsTempDir=new QTemporaryDir(QDir::tempPath() + "/" KFI_TMP_DIR_PREFIX); | ||
315 | itsTempDir->setAutoRemove(true); | 315 | itsTempDir->setAutoRemove(true); | ||
316 | 316 | | |||
317 | ((KArchiveFile *)entry)->copyTo(itsTempDir->path()); | 317 | ((KArchiveFile *)entry)->copyTo(itsTempDir->path()); | ||
318 | 318 | | |||
319 | QMimeDatabase db; | 319 | QMimeDatabase db; | ||
320 | QString mime(db.mimeTypeForFile(itsTempDir->path()+QLatin1Char('/')+entry->name()).name()); | 320 | QString mime(db.mimeTypeForFile(itsTempDir->filePath(entry->name())).name()); | ||
321 | 321 | | |||
322 | if(mime=="font/ttf" || mime=="font/otf" || mime=="application/x-font-ttf" || | 322 | if(mime=="font/ttf" || mime=="font/otf" || mime=="application/x-font-ttf" || | ||
323 | mime=="application/x-font-otf" || mime=="application/x-font-type1") | 323 | mime=="application/x-font-otf" || mime=="application/x-font-type1") | ||
324 | { | 324 | { | ||
325 | fontFile=itsTempDir->path()+QLatin1Char('/')+entry->name(); | 325 | fontFile=itsTempDir->filePath(entry->name()); | ||
326 | //setLocalFilePath(itsTempDir->path()+QLatin1Char('/')+entry->name()); | 326 | //setLocalFilePath(itsTempDir->path()+QLatin1Char('/')+entry->name()); | ||
327 | // itsMetaUrl=QUrl::fromLocalFile(localFilePath()); | 327 | // itsMetaUrl=QUrl::fromLocalFile(localFilePath()); | ||
328 | break; | 328 | break; | ||
329 | } | 329 | } | ||
330 | else | 330 | else | ||
331 | ::unlink(QFile::encodeName(itsTempDir->path()+QLatin1Char('/')+entry->name()).data()); | 331 | ::unlink(QFile::encodeName(itsTempDir->filePath(entry->name())).data()); | ||
332 | } | 332 | } | ||
333 | } | 333 | } | ||
334 | } | 334 | } | ||
335 | } | 335 | } | ||
336 | } | 336 | } | ||
337 | } | 337 | } | ||
338 | } | 338 | } | ||
339 | 339 | | |||
▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines |