Skip to content

Commit

Permalink
Small cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 17, 2017
1 parent 8267fa3 commit 43e4024
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 32 deletions.
Empty file modified src/app/locator/qgsinbuiltlocatorfilters.h
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion src/app/locator/qgslocatoroptionswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class QgsLocatorFiltersModel : public QAbstractTableModel

QgsLocator *mLocator = nullptr;

// changes are defered to support cancelation
// changes are deferred to support cancelation
QHash< QgsLocatorFilter *, bool > mEnabledChanges;
QHash< QgsLocatorFilter *, bool > mDefaultChanges;

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
new QgsCredentialDialog( this );

mLocatorWidget->setMapCanvas( mMapCanvas );
connect( mLocatorWidget, &QgsLocatorWidget::configTriggered, this, [ = ] { showOptionsDialog( this, QString( "mOptionsPageLocator" ) ); } );
connect( mLocatorWidget, &QgsLocatorWidget::configTriggered, this, [ = ] { showOptionsDialog( this, QString( "mOptionsLocatorSettings" ) ); } );

qApp->processEvents();

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgssettingstree.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ QTreeWidgetItem *QgsSettingsTree::createItem( const QString &text,
item->setFlags( item->flags() | Qt::ItemIsEditable );

QString key = itemKey( item );
QgsDebugMsgLevel( key , 4);
QgsDebugMsgLevel( key, 4 );
if ( settingsMap.contains( key ) )
{
QgsDebugMsgLevel( "contains!!!!", 4 );
Expand Down
12 changes: 11 additions & 1 deletion src/gui/locator/qgslocatorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,10 @@ void QgsLocatorResultsView::selectPreviousResult()
setCurrentIndex( model()->index( previousRow, 0 ) );
}

///@endcond

//
// QgsLocatorProxyModel
//

QgsLocatorProxyModel::QgsLocatorProxyModel( QObject *parent )
: QSortFilterProxyModel( parent )
Expand Down Expand Up @@ -566,6 +568,11 @@ bool QgsLocatorProxyModel::lessThan( const QModelIndex &left, const QModelIndex
return QString::localeAwareCompare( leftFilter, rightFilter ) < 0;
}


//
// QgsLocatorFilterFilter
//

QgsLocatorFilterFilter::QgsLocatorFilterFilter( QgsLocatorWidget *locator, QObject *parent )
: QgsLocatorFilter( parent )
, mLocator( locator )
Expand Down Expand Up @@ -603,3 +610,6 @@ void QgsLocatorFilterFilter::triggerResult( const QgsLocatorResult &result )
{
mLocator->search( result.userData.toString() );
}


///@endcond
2 changes: 1 addition & 1 deletion src/gui/locator/qgslocatorwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class QgsLocatorFilterFilter : public QgsLocatorFilter

virtual QString name() const override { return QStringLiteral( "filters" );}
virtual QString displayName() const override { return QString(); }
virtual Priority priority() const { return static_cast< QgsLocatorFilter::Priority>( -1 ); /** shh, we cheat!**/ }
virtual Priority priority() const override { return static_cast< QgsLocatorFilter::Priority>( -1 ); /** shh, we cheat!**/ }
virtual void fetchResults( const QString &string, const QgsLocatorContext &context, QgsFeedback *feedback ) override;
virtual void triggerResult( const QgsLocatorResult &result ) override;

Expand Down
54 changes: 27 additions & 27 deletions src/ui/qgsoptionsbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
<item>
<widget class="QStackedWidget" name="mOptionsStackedWidget">
<property name="currentIndex">
<number>15</number>
<number>0</number>
</property>
<widget class="QWidget" name="mOptionsPageGeneral">
<layout class="QVBoxLayout" name="verticalLayout_3">
Expand Down Expand Up @@ -349,8 +349,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>856</width>
<height>679</height>
<width>843</width>

This comment has been minimized.

Copy link
@elpaso

elpaso May 24, 2017

Contributor

@nyalldawson I'm not sure about what exact commit broke it, but the sidebar in the options dialog is not collapsible anymore.

This is the maximum I can shrink it:

image

This comment has been minimized.

Copy link
@DelazJ

DelazJ May 24, 2017

Contributor

This comment has been minimized.

Copy link
@elpaso

elpaso May 26, 2017

Contributor

@3nids @DelazJ thanks for the pointer, I've re-opened the issue since it's not fixed in master.

This comment has been minimized.

Copy link
@3nids

3nids May 29, 2017

Member

could it be related to the list widget rather than the combobox? I wonder if it could be the appearance of scroll bars. @NathanW2 ?

<height>702</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_28">
Expand Down Expand Up @@ -1035,8 +1035,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>429</width>
<height>1009</height>
<width>579</width>
<height>1110</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_22">
Expand Down Expand Up @@ -1565,8 +1565,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>856</width>
<height>679</height>
<width>531</width>
<height>787</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_27">
Expand Down Expand Up @@ -1933,8 +1933,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>541</width>
<height>827</height>
<width>713</width>
<height>1110</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_22">
Expand Down Expand Up @@ -2684,8 +2684,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>112</width>
<height>219</height>
<width>151</width>
<height>239</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_46">
Expand Down Expand Up @@ -2835,8 +2835,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>453</width>
<height>281</height>
<width>523</width>
<height>370</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_25">
Expand Down Expand Up @@ -3178,8 +3178,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>506</width>
<height>533</height>
<width>640</width>
<height>660</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_30">
Expand Down Expand Up @@ -3622,8 +3622,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>393</width>
<height>530</height>
<width>509</width>
<height>623</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_39">
Expand Down Expand Up @@ -3891,8 +3891,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>488</width>
<height>612</height>
<width>572</width>
<height>828</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_31">
Expand Down Expand Up @@ -4469,8 +4469,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>345</width>
<height>350</height>
<width>435</width>
<height>402</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
Expand Down Expand Up @@ -4608,8 +4608,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>332</width>
<height>499</height>
<width>437</width>
<height>584</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_15">
Expand Down Expand Up @@ -4821,8 +4821,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>221</width>
<height>201</height>
<width>292</width>
<height>258</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_32">
Expand Down Expand Up @@ -4930,8 +4930,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect>
<x>0</x>
<y>0</y>
<width>393</width>
<height>618</height>
<width>534</width>
<height>790</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_33">
Expand Down

0 comments on commit 43e4024

Please sign in to comment.