~ubuntu-branches/ubuntu/wily/scribus/wily-proposed

« back to all changes in this revision

Viewing changes to scribus/util.cpp

  • Committer: Package Import Robot
  • Author(s): Oleksandr Moskalenko
  • Date: 2012-02-09 21:50:56 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120209215056-2wrx1ara0jbm7fi5
Tags: 1.4.0.dfsg+r17287-1
* New upstream stable release upload into Debian (Closes: #654703).
* Applied the Ubuntu armel patch.
* Removed non-free color swatches from resources.
* debian/control:
  - Moved icc-profiles from Recommends to Suggests (Closes: #655885).
  - Updated Standards-Version to 3.9.2.
  - Updated extended description per lintian warning.
* debian/rules:
  - Update mailcap (Closes: #630751). A request for mime.types update has
    been sent to the mime-support maintainer.
  - Added build-arch and build-indep targets per lintian warning.
* debian/patches:
  - top_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't install the non-free "doc" dir.
  - profiles_cmakelists.patch - don't install non-free sRGB profile.
* debian/copyright: 
  - Converted to the DEP5 machine readable foramt.
  - Added licenses for free color swatches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
                WCHAR shortName[MAX_PATH + 1];
88
88
                // An error should not be blocking as ERROR_INVALID_PARAMETER can simply mean
89
89
                // that volume does not support 8.3 filenames, so return longPath in this case
90
 
                QString nativePath = QDir::convertSeparators(longPath);
 
90
                QString nativePath = QDir::toNativeSeparators(longPath);
91
91
                int ret = GetShortPathNameW((LPCWSTR) nativePath.utf16(), shortName, MAX_PATH);
92
92
                if (ret != ERROR_INVALID_PARAMETER && ret < MAX_PATH)
93
93
                        shortPath = QString::fromUtf16((const ushort*) shortName);
107
107
                WCHAR longName[MAX_PATH + 1];
108
108
                // An error should not be blocking as ERROR_INVALID_PARAMETER can simply mean
109
109
                // that volume does not support long filenames, so return shortPath in this case
110
 
                QString nativePath = QDir::convertSeparators(shortPath);
 
110
                QString nativePath = QDir::toNativeSeparators(shortPath);
111
111
                int ret = GetLongPathNameW((LPCWSTR) nativePath.utf16(), longName, MAX_PATH);
112
112
                if (ret != ERROR_INVALID_PARAMETER && ret < MAX_PATH)
113
113
                        longPath = QString::fromUtf16((const ushort*) longName);
361
361
        QFileInfo fi(filename);
362
362
        if (fi.exists())
363
363
        {
364
 
                QString fn = QDir::convertSeparators(filename);
 
364
                QString fn = QDir::toNativeSeparators(filename);
365
365
                int t = QMessageBox::warning(parent, QObject::tr("File exists"),
366
366
                                                                         "<qt>"+ QObject::tr("A file named '%1' already exists.<br/>Do you want to replace it with the file you are saving?").arg(fn) +"</qt>",
367
367
                                                                                         QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel);
498
498
        return retList;
499
499
}
500
500
 
 
501
bool sortingQPairOfStrings( QPair<QString, QString> aP, QPair<QString, QString> bP)
 
502
{
 
503
        if (aP.first == bP.first)
 
504
                return (aP.second < bP.second);
 
505
        return (aP.first < bP.first);
 
506
}
 
507
 
501
508
QString checkFileExtension(const QString &currName, const QString &extension)
502
509
{
503
510
        QString newName(currName);