[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [marble] /: Repair ne_50m_land.pn2 with abhinav's latest bugfix.
From: Torsten Rahn <rahn () kde ! org>
Date: 2014-08-09 18:45:42
Message-ID: E1XGBeA-0003Gs-JS () scm ! kde ! org
[Download RAW message or body]
Git commit 759e5aee6e83800ea3b2eeb73809148c8c504950 by Torsten Rahn.
Committed on 09/08/2014 at 18:44.
Pushed by rahn into branch 'master'.
Repair ne_50m_land.pn2 with abhinav's latest bugfix.
M +- -- data/naturalearth/ne_50m_land.pn2
M +9 -1 tools/shp2pn2/shp2pn2.cpp
http://commits.kde.org/marble/759e5aee6e83800ea3b2eeb73809148c8c504950
diff --git a/data/naturalearth/ne_50m_land.pn2 b/data/naturalearth/ne_50m_land.pn2
index ac75e2e..ee2bf70 100644
Binary files a/data/naturalearth/ne_50m_land.pn2 and b/data/naturalearth/ne_50m_land.pn2 differ
diff --git a/tools/shp2pn2/shp2pn2.cpp b/tools/shp2pn2/shp2pn2.cpp
index 7bcf637..fb8936c 100644
--- a/tools/shp2pn2/shp2pn2.cpp
+++ b/tools/shp2pn2/shp2pn2.cpp
@@ -142,12 +142,16 @@ int main(int argc, char** argv)
QApplication app(argc,argv);
- qDebug( " Syntax: shp2pn2 [-i shp-sourcefile -o pn2-targetfile]" );
+ qDebug() << " Syntax: shp2pn2 [-i shp-sourcefile -o pn2-targetfile]";
QString inputFilename;
int inputIndex = app.arguments().indexOf( "-i" );
if ( inputIndex > 0 && inputIndex + 1 < argc )
inputFilename = app.arguments().at( inputIndex + 1 );
+ else {
+ qWarning() << "Input file missing.";
+ return 1;
+ }
QString outputFilename = "output.pn2";
int outputIndex = app.arguments().indexOf("-o");
@@ -159,6 +163,10 @@ int main(int argc, char** argv)
ParsingRunnerManager* manager = new ParsingRunnerManager( model->pluginManager() );
GeoDataDocument* document = manager->openFile( inputFilename );
+ if (!document) {
+ qWarning() << "Could not parse document (have you installed libshape?) !";
+ return 1;
+ }
QFile file( outputFilename );
file.open( QIODevice::WriteOnly );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic