Changeset View
Changeset View
Standalone View
Standalone View
src/filewidgets/knewfilemenu.cpp
Show First 20 Lines • Show All 1323 Lines • ▼ Show 20 Line(s) | 1323 | if (localUrl.isLocalFile()) { | |||
---|---|---|---|---|---|
1324 | // Normal (local) file. Need to "touch" it, kio_file copied the mtime. | 1324 | // Normal (local) file. Need to "touch" it, kio_file copied the mtime. | ||
1325 | (void) ::utime(QFile::encodeName(localUrl.toLocalFile()).constData(), nullptr); | 1325 | (void) ::utime(QFile::encodeName(localUrl.toLocalFile()).constData(), nullptr); | ||
1326 | } | 1326 | } | ||
1327 | emit fileCreated(destUrl); | 1327 | emit fileCreated(destUrl); | ||
1328 | } else if (KIO::SimpleJob *simpleJob = ::qobject_cast<KIO::SimpleJob *>(job)) { | 1328 | } else if (KIO::SimpleJob *simpleJob = ::qobject_cast<KIO::SimpleJob *>(job)) { | ||
1329 | // Called in the storedPut() case | 1329 | // Called in the storedPut() case | ||
1330 | org::kde::KDirNotify::emitFilesAdded(simpleJob->url().adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash)); | 1330 | org::kde::KDirNotify::emitFilesAdded(simpleJob->url().adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash)); | ||
1331 | emit fileCreated(simpleJob->url()); | 1331 | emit fileCreated(simpleJob->url()); | ||
1332 | } else { | 1332 | } | ||
1333 | | ||||
1334 | if (job->property("newDirectoryURL").isValid()) { | ||||
1333 | QUrl newDirectoryURL = job->property("newDirectoryURL").toUrl(); | 1335 | QUrl newDirectoryURL = job->property("newDirectoryURL").toUrl(); | ||
1334 | if (newDirectoryURL.isValid()) { | | |||
1335 | emit directoryCreated(newDirectoryURL); | 1336 | emit directoryCreated(newDirectoryURL); | ||
1336 | } else { | | |||
1337 | qWarning() << "Neither copy, put nor mkdir, internal error"; | | |||
1338 | } | | |||
1339 | } | 1337 | } | ||
1340 | } | 1338 | } | ||
1341 | if (!d->m_tempFileToDelete.isEmpty()) { | 1339 | if (!d->m_tempFileToDelete.isEmpty()) { | ||
1342 | QFile::remove(d->m_tempFileToDelete); | 1340 | QFile::remove(d->m_tempFileToDelete); | ||
1343 | } | 1341 | } | ||
1344 | } | 1342 | } | ||
1345 | 1343 | | |||
1346 | QStringList KNewFileMenu::supportedMimeTypes() const | 1344 | QStringList KNewFileMenu::supportedMimeTypes() const | ||
1347 | { | 1345 | { | ||
1348 | return d->m_supportedMimeTypes; | 1346 | return d->m_supportedMimeTypes; | ||
1349 | } | 1347 | } | ||
1350 | 1348 | | |||
1351 | #include "moc_knewfilemenu.cpp" | 1349 | #include "moc_knewfilemenu.cpp" | ||
1352 | 1350 | |