Skip to content

Commit 0ba038f

Browse files
committed
remove a failing connect and avoid absolutePath warning in empty project
1 parent 17f20bb commit 0ba038f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/app/qgsattributetypedialog.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl, int fieldIdx
4545
setupUi( this );
4646
setWindowTitle( tr( "Edit Widget Properties - %1 (%2)" ).arg( vl->fields().at( fieldIdx ).name(), vl->name() ) );
4747

48-
connect( selectionListWidget, SIGNAL( currentRowChanged( int ) ), this, SLOT( setStackPage( int ) ) );
49-
5048
QMapIterator<QString, QgsEditorWidgetFactory*> it( QgsEditorWidgetRegistry::instance()->factories() );
5149
while ( it.hasNext() )
5250
{

src/gui/editorwidgets/qgsexternalresourceconfigdlg.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ QgsExternalResourceConfigDlg::QgsExternalResourceConfigDlg( QgsVectorLayer* vl,
3131
mUseLink->setChecked( false );
3232
mFullUrl->setChecked( false );
3333
mDocumentViewerGroupBox->setChecked( false );
34-
mRootPath->setPlaceholderText( QSettings().value( "/UI/lastExternalResourceWidgetDefaultPath", QDir::toNativeSeparators( QDir::cleanPath( QgsProject::instance()->fileInfo().absolutePath() ) ) ).toString() );
34+
35+
QString defpath = QgsProject::instance()->fileName().isEmpty() ? QDir::currentPath() : QgsProject::instance()->fileInfo().absolutePath();
36+
37+
mRootPath->setPlaceholderText( QSettings().value( "/UI/lastExternalResourceWidgetDefaultPath", QDir::toNativeSeparators( QDir::cleanPath( defpath ) ) ).toString() );
3538

3639
// Add connection to button for choosing default path
3740
connect( mRootPathButton, SIGNAL( clicked() ), this, SLOT( chooseDefaultPath() ) );

0 commit comments

Comments
 (0)