~ubuntu-branches/ubuntu/utopic/psi/utopic

« back to all changes in this revision

Viewing changes to src/fileutil.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2010-02-19 09:37:12 UTC
  • mfrom: (6.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100219093712-e225xvm1wjcf1cgi
Tags: 0.14-2
* comment out only function which uses va_list to work around build
  problems on armel
* Set Standards-Version to 3.8.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
{
61
61
        while (1) {
62
62
                if (lastUsedOpenPath().isEmpty()) {
63
 
                        setLastUsedOpenPath(QDir::homeDirPath());
 
63
                        setLastUsedOpenPath(QDir::homePath());
64
64
                }
65
65
                QString fileName = QFileDialog::getOpenFileName(parent, caption, lastUsedOpenPath(), filter, selectedFilter);
66
66
                if (!fileName.isEmpty()) {
70
70
                                continue;
71
71
                        }
72
72
 
73
 
                        setLastUsedOpenPath(fi.dirPath());
 
73
                        setLastUsedOpenPath(fi.path());
74
74
                        return fileName;
75
75
                }
76
76
                break;
86
86
                        setLastUsedSavePath(lastUsedOpenPath());
87
87
                }
88
88
                else {
89
 
                        setLastUsedSavePath(QDir::homeDirPath());
 
89
                        setLastUsedSavePath(QDir::homePath());
90
90
                }
91
91
        }
92
92
 
94
94
        QString fileName = QFileDialog::getSaveFileName(parent, caption, dir, filter, selectedFilter);
95
95
        if (!fileName.isEmpty()) {
96
96
                QFileInfo fi(fileName);
97
 
                if (QDir(fi.dirPath()).exists()) {
98
 
                        setLastUsedSavePath(fi.dirPath());
 
97
                if (QDir(fi.path()).exists()) {
 
98
                        setLastUsedSavePath(fi.path());
99
99
                        return fileName;
100
100
                }
101
101
        }