~d.filoni/telegram-app/audio_receiving_and_sending

« back to all changes in this revision

Viewing changes to telegram/app/telegram.cpp

  • Committer: Devid Antonio Filoni
  • Date: 2016-11-28 18:08:03 UTC
  • Revision ID: d.filoni@ubuntu.com-20161128180803-v1h4g4m0rq0dbvwz
Trivial code cleanup after merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
QString Cutegram::createTemporaryFile(const QString &phone, const QString &prefix, const QString &ext)
261
261
{
262
262
    // Create temporary file, e.g. recorded audio
263
 
    QDir dataLocation(QDir::homePath() + "/.cache/" + QCoreApplication::organizationDomain() + "/" + phone + "/temp/" + prefix);
 
263
    QDir dataLocation(cacheDirectory() + "/" + phone + "/temp/" + prefix);
264
264
    if (!dataLocation.exists()) {
265
265
        dataLocation.mkpath(".");
266
266
    }
275
275
void Cutegram::deleteTemporaryFiles(const QString &phone, const QString &prefix)
276
276
{
277
277
    // Delete temporary file
278
 
    QDir dir(QDir::homePath() + "/.cache/" + QCoreApplication::organizationDomain() + "/" + phone + "/temp/" + prefix);
 
278
    QDir dir(cacheDirectory() + "/" + phone + "/temp/" + prefix);
279
279
    qDebug() << "deleting" << dir.absolutePath();
280
280
    dir.removeRecursively();
281
281
}