Fix some more lines that are too long.

This commit is contained in:
Felix Geyer 2012-04-18 23:05:31 +02:00
parent 2e011d5362
commit 37291d278e
2 changed files with 14 additions and 8 deletions

View File

@ -20,7 +20,8 @@
#include "core/Config.h"
QString FileDialog::getOpenFileName(QWidget* parent, const QString& caption, QString dir,
const QString& filter, QString* selectedFilter, QFileDialog::Options options)
const QString& filter, QString* selectedFilter,
QFileDialog::Options options)
{
if (!m_nextFileName.isEmpty()) {
QString result = m_nextFileName;
@ -32,7 +33,8 @@ QString FileDialog::getOpenFileName(QWidget* parent, const QString& caption, QSt
dir = config()->get("LastDir").toString();
}
QString result = QFileDialog::getOpenFileName(parent, caption, dir, filter, selectedFilter, options);
QString result = QFileDialog::getOpenFileName(parent, caption, dir, filter,
selectedFilter, options);
if (!result.isEmpty()) {
config()->set("LastDir", QFileInfo(result).absolutePath());
@ -43,7 +45,8 @@ QString FileDialog::getOpenFileName(QWidget* parent, const QString& caption, QSt
}
QString FileDialog::getSaveFileName(QWidget* parent, const QString& caption, QString dir,
const QString& filter, QString* selectedFilter, QFileDialog::Options options)
const QString& filter, QString* selectedFilter,
QFileDialog::Options options)
{
if (!m_nextFileName.isEmpty()) {
QString result = m_nextFileName;
@ -55,7 +58,8 @@ QString FileDialog::getSaveFileName(QWidget* parent, const QString& caption, QSt
dir = config()->get("LastDir").toString();
}
QString result = QFileDialog::getSaveFileName(parent, caption, dir, filter, selectedFilter, options);
QString result = QFileDialog::getSaveFileName(parent, caption, dir, filter,
selectedFilter, options);
if (!result.isEmpty()) {
config()->set("LastDir", QFileInfo(result).absolutePath());

View File

@ -23,10 +23,12 @@
class FileDialog
{
public:
QString getOpenFileName(QWidget* parent = 0, const QString& caption = QString(), QString dir = QString(),
const QString& filter = QString(), QString* selectedFilter = 0, QFileDialog::Options options = 0);
QString getSaveFileName(QWidget* parent = 0, const QString& caption = QString(), QString dir = QString(),
const QString& filter = QString(), QString* selectedFilter = 0, QFileDialog::Options options = 0);
QString getOpenFileName(QWidget* parent = 0, const QString& caption = QString(),
QString dir = QString(), const QString& filter = QString(),
QString* selectedFilter = 0, QFileDialog::Options options = 0);
QString getSaveFileName(QWidget* parent = 0, const QString& caption = QString(),
QString dir = QString(), const QString& filter = QString(),
QString* selectedFilter = 0, QFileDialog::Options options = 0);
/**
* Sets the result of the next get* method call.