Use current directory as dialog start

This commit is contained in:
Stefan Bühler 2012-04-09 12:12:30 +02:00
parent 573e2dd6b6
commit 7a5f0ed60f
2 changed files with 5 additions and 5 deletions

View File

@ -131,7 +131,7 @@ namespace qcross {
//protected:
void CNewGameDialog::importPackage() {
QString fileName = QFileDialog::getOpenFileName(this, tr("Select a package to import"),
QDir::homePath(), tr("QCross Package (*.cpk)"));
QString(), tr("QCross Package (*.cpk)"));
if (!fileName.isEmpty()) {
/* if (!File::exists(QCROSS_STRING_DATAPATH))
QDir::mkpath(QCROSS_STRING_DATAPATH);*/
@ -146,7 +146,7 @@ namespace qcross {
void CNewGameDialog::openPictureFile() {
QString fileName = QFileDialog::getOpenFileName(this, tr("Select a picture to open"),
QDir::homePath(), tr("Images (*.png *.xpm *.xbm *.jpg)"));
QString(), tr("Images (*.png *.xpm *.xbm *.jpg)"));
if (!fileName.isEmpty()) {
if (m_Nonogram)
delete m_Nonogram;

View File

@ -119,7 +119,7 @@ namespace qcrossedit {
m_Unsaved = false;
QString fileName = QFileDialog::getOpenFileName(this, tr("Select a nonogram package to open"),
QDir::homePath(), tr("QCross Package (*.cpk)"));
QString(), tr("QCross Package (*.cpk)"));
if (!fileName.isEmpty()) {
if (m_Package)
delete m_Package;
@ -156,7 +156,7 @@ namespace qcrossedit {
bool CMainWindow::fileSaveAs() {
QString fileName = QFileDialog::getSaveFileName(this, tr("Select a file name for the current package"),
QDir::homePath(), tr("QCross Package (*.cpk)"));
QString(), tr("QCross Package (*.cpk)"));
if (!fileName.isEmpty()) {
if (!QRegExp("*.cpk").exactMatch(fileName))
fileName.append(".cpk");
@ -175,7 +175,7 @@ namespace qcrossedit {
void CMainWindow::editCreateFromPicture() {
QString fileName = QFileDialog::getOpenFileName(this, tr("Select a image file to import"),
QDir::homePath(), tr("Images (*.png *.xpm *.xbm *.jpg)"));
QString(), tr("Images (*.png *.xpm *.xbm *.jpg)"));
if (!fileName.isEmpty()) {
if (qobject_cast<CCrossPackageModel *>(m_PicListView->model())->appendImage(fileName, QImage(fileName)))
m_Unsaved = true;