Commit ab4c561e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to QTemporaryFile

parent 1e5a2c4b
......@@ -210,7 +210,7 @@ bool AlarmCalendar::open()
created = saveCal(mICalUrl.toLocalFile());
else
{
KTemporaryFile tmpFile;
QTemporaryFile tmpFile;
tmpFile.setAutoRemove(false);
tmpFile.open();
created = saveCal(tmpFile.fileName());
......@@ -749,11 +749,11 @@ bool AlarmCalendar::exportAlarms(const KAEvent::List& events, QWidget* parent)
{
// One or more alarms have been exported to the calendar.
// Save the calendar to file.
KTemporaryFile* tempFile = 0;
QTemporaryFile* tempFile = 0;
bool local = url.isLocalFile();
if (!local)
{
tempFile = new KTemporaryFile;
tempFile = new QTemporaryFile;
file = tempFile->fileName();
}
calStorage->setFileName(file);
......
......@@ -2119,7 +2119,7 @@ QString KAlarmApp::composeXTermCommand(const QString& command, const KAEvent& ev
*/
QString KAlarmApp::createTempScriptFile(const QString& command, bool insertShell, const KAEvent& event, const KAAlarm& alarm) const
{
KTemporaryFile tmpFile;
QTemporaryFile tmpFile;
tmpFile.setAutoRemove(false); // don't delete file when it is destructed
if (!tmpFile.open())
qCritical() << "Unable to create a temporary script file";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment