Skip to content

Commit b1a6c79

Browse files
committed
Remove QgsFileDropEdit widget and integrate functionality into QgsFileWidget
It makes no sense to have two classes covering this use case, with partial functionality in each. Smash the two together so we can safely use QgsFileWidget for all use cases in future.
1 parent 10968ae commit b1a6c79

File tree

11 files changed

+254
-242
lines changed

11 files changed

+254
-242
lines changed

doc/api_break.dox

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
267267
- QgsDataDefinedSymbolDialog was removed. Code using this dialog should be reworked to use QgsPropertyOverrideButton
268268
- QgsDefaultPluginLayerLegend was removed. Use QgsMapLayer::setLegend() to provide legend nodes for plugin layers.
269269
- QgsFileNameWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead.
270+
- QgsFileDropEdit was removed. Use QgsFileWidget instead.
270271
- QgsFormAnnotationItem. Use QgsFormAnnotation instead.
271272
- QgsHtmlAnnotationItem. Use QgsHtmlAnnotation instead.
272273
- QgsHttpTransaction. This class was outdated and code should be ported to native Qt or Python implementations.

python/gui/gui_auto.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
%Include qgscustomdrophandler.sip
55
%Include qgsdetaileditemdata.sip
66
%Include qgsexpressionbuilderdialog.sip
7-
%Include qgsfiledropedit.sip
87
%Include qgsgeometryrubberband.sip
98
%Include qgsgui.sip
109
%Include qgshelp.sip

python/gui/qgsfilewidget.sip

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010

1111

12-
13-
1412
class QgsFileWidget : QWidget
1513
{
1614
%Docstring
@@ -149,6 +147,14 @@ returns if the relative path is with respect to the project path or the default
149147
determines if the relative path is with respect to the project path or the default path
150148
%End
151149

150+
QLineEdit *lineEdit();
151+
%Docstring
152+
Returns a pointer to the widget's line edit, which can be used to customise
153+
the appearance and behavior of the line edit portion of the widget.
154+
.. versionadded:: 3.0
155+
:rtype: QLineEdit
156+
%End
157+
152158
signals:
153159
void fileChanged( const QString & );
154160
%Docstring
@@ -157,6 +163,10 @@ emitted as soon as the current file or directory is changed
157163

158164
};
159165

166+
167+
168+
169+
160170
/************************************************************************
161171
* This file has been generated automatically from *
162172
* *

src/gui/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ SET(QGIS_GUI_SRCS
243243
qgsfieldexpressionwidget.cpp
244244
qgsfieldvalidator.cpp
245245
qgsfieldvalueslineedit.cpp
246-
qgsfiledropedit.cpp
247246
qgsfilewidget.cpp
248247
qgsfilterlineedit.cpp
249248
qgsfloatingwidget.cpp
@@ -408,7 +407,6 @@ SET(QGIS_GUI_MOC_HDRS
408407
qgsfieldexpressionwidget.h
409408
qgsfieldvalidator.h
410409
qgsfieldvalueslineedit.h
411-
qgsfiledropedit.h
412410
qgsfilewidget.h
413411
qgsfilterlineedit.h
414412
qgsfloatingwidget.h
@@ -691,7 +689,6 @@ SET(QGIS_GUI_HDRS
691689
qgscustomdrophandler.h
692690
qgsdetaileditemdata.h
693691
qgsexpressionbuilderdialog.h
694-
qgsfiledropedit.h
695692
qgsgeometryrubberband.h
696693
qgsgui.h
697694
qgsguiutils.h

src/gui/qgsfiledropedit.cpp

Lines changed: 0 additions & 121 deletions
This file was deleted.

src/gui/qgsfiledropedit.h

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)