~ubuntu-branches/ubuntu/trusty/scribus/trusty

« back to all changes in this revision

Viewing changes to scribus/customfdialog.cpp

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2013-05-16 20:34:07 UTC
  • mfrom: (1.1.13) (32.1.2 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130516203407-ztj7ebsivoo41dih
Tags: 1.4.2.dfsg+r18267-1ubuntu2
Avoid qreal/double type clashes on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
456
456
 
457
457
void CustomFDialog::handleCompress()
458
458
{
459
 
        QFileInfo tmp;
460
 
        tmp.setFile(selectedFile());
461
 
        QString e(tmp.completeSuffix());
462
 
        QStringList ex = e.split(".", QString::SkipEmptyParts);
463
 
        QString baseExt = "";
464
 
        for (int a = 0; a < ex.count(); a++)
 
459
        QString   fileName;
 
460
        QFileInfo tmp(selectedFile());
 
461
        QString   fn(tmp.fileName());
 
462
        QStringList fc = fn.split(".", QString::KeepEmptyParts);
 
463
        if (fc.count() > 0)
 
464
                fileName = fc.at(0);
 
465
        for (int a = 1; a < fc.count(); a++)
465
466
        {
466
 
                if ((ex[a] != "sla") && (ex[a] != "SLA") && (ex[a] != "gz") && (ex[a] != "GZ"))
467
 
                        baseExt += "."+ex[a];
 
467
                if (fc.at(a).compare("sla", Qt::CaseInsensitive) == 0)
 
468
                        continue;
 
469
                if (fc.at(a).compare("gz", Qt::CaseInsensitive) == 0)
 
470
                        continue;
 
471
                if (fc.at(a).compare(ext, Qt::CaseInsensitive) == 0)
 
472
                        continue;
 
473
                if (fc.at(a).compare(extZip, Qt::CaseInsensitive) == 0)
 
474
                        continue;
 
475
                fileName += "." + fc[a];
468
476
        }
469
477
        if (SaveZip->isChecked())
470
 
        {
471
 
                if (e != extZip)
472
 
                        tmp.setFile(tmp.baseName() + baseExt + "." + extZip);
473
 
        }
 
478
                tmp.setFile(fileName + "." + extZip);
474
479
        else
475
 
        {
476
 
                if (e != ext)
477
 
                        tmp.setFile(tmp.baseName() + baseExt + "." + ext);
478
 
        }
 
480
                tmp.setFile(fileName + "." + ext);
479
481
        setSelection(tmp.fileName());
480
482
}
481
483