-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change in handling of missing layers within QgsProject. Instead of th…
…rowing an exception, now a custom handler is called that might try to fix the missing layers. There's a default handler (QgsProjectBadLayerDefaultHandler) which simply ignores all missing layers. Then there's a GUI handler (QgsProjectBadLayerGuiHandler) in GUI library which asks user about the path for missing layers. QGIS application automatically installs the GUI handler on startup. This should allow python plugins/applications to work with QgsProject without a fear of a segfault as there are no more exceptions thrown during load/save of the project files. Some further notes: - removed QgsProjectBadLayerException class and (now empty) qgsexception.cpp file - openFilesRememberingFilter() moved to QgisGui namespace (was duplicated: QgisApp vs QgsOpenVectorLayerDialog) - removed deprecated buildVectorFilters_ methods - added python bindings for new classes/methods git-svn-id: http://svn.osgeo.org/qgis/trunk@12350 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
wonder
committed
Dec 7, 2009
1 parent
90eac5e
commit 4bb5cad
Showing
16 changed files
with
589 additions
and
755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
/** \ingroup gui | ||
Handler for missing layers within project. | ||
|
||
Gives user a chance to select path to the missing layers. | ||
|
||
@note added in 1.4 | ||
*/ | ||
class QgsProjectBadLayerGuiHandler : QObject, QgsProjectBadLayerHandler | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsprojectbadlayerguihandler.h> | ||
%End | ||
|
||
public: | ||
QgsProjectBadLayerGuiHandler(); | ||
|
||
/** implementation of the handler */ | ||
virtual void handleBadLayers( QList<QDomNode> layers, QDomDocument projectDom ); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.