@@ -101,7 +101,7 @@ bool QgsDwgImporter::exec( const QString &sql, bool logError )
101
101
102
102
if ( logError )
103
103
{
104
- LOG ( QObject:: tr ( " SQL statement failed\n Database: %1\n SQL: %2\n Error: %3" )
104
+ LOG ( tr ( " SQL statement failed\n Database: %1\n SQL: %2\n Error: %3" )
105
105
.arg ( mDatabase , sql, QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
106
106
}
107
107
return false ;
@@ -127,7 +127,7 @@ OGRLayerH QgsDwgImporter::query( const QString &sql )
127
127
if ( CPLGetLastErrorType () == CE_None )
128
128
return layer;
129
129
130
- LOG ( QObject:: tr ( " SQL statement failed\n Database: %1\n SQL: %2\n Error: %3" )
130
+ LOG ( tr ( " SQL statement failed\n Database: %1\n SQL: %2\n Error: %3" )
131
131
.arg ( mDatabase , sql, QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
132
132
133
133
OGR_DS_ReleaseResultSet ( mDs .get (), layer );
@@ -142,7 +142,7 @@ void QgsDwgImporter::startTransaction()
142
142
mInTransaction = GDALDatasetStartTransaction ( mDs .get (), 0 ) == OGRERR_NONE;
143
143
if ( !mInTransaction )
144
144
{
145
- LOG ( QObject:: tr ( " Could not start transaction\n Database: %1\n Error: %2" )
145
+ LOG ( tr ( " Could not start transaction\n Database: %1\n Error: %2" )
146
146
.arg ( mDatabase , QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
147
147
}
148
148
}
@@ -153,7 +153,7 @@ void QgsDwgImporter::commitTransaction()
153
153
154
154
if ( mInTransaction && GDALDatasetCommitTransaction ( mDs .get () ) != OGRERR_NONE )
155
155
{
156
- LOG ( QObject:: tr ( " Could not commit transaction\n Database: %1\n Error: %2" )
156
+ LOG ( tr ( " Could not commit transaction\n Database: %1\n Error: %2" )
157
157
.arg ( mDatabase , QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
158
158
}
159
159
mInTransaction = false ;
@@ -190,7 +190,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
190
190
QFileInfo fi ( drawing );
191
191
if ( !fi.isReadable () )
192
192
{
193
- error = QObject:: tr ( " Drawing %1 is unreadable" ).arg ( drawing );
193
+ error = tr ( " Drawing %1 is unreadable" ).arg ( drawing );
194
194
return false ;
195
195
}
196
196
@@ -199,15 +199,15 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
199
199
mDs .reset ( OGROpen ( mDatabase .toUtf8 ().constData (), true , nullptr ) );
200
200
if ( !mDs )
201
201
{
202
- LOG ( QObject:: tr ( " Could not open database [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
202
+ LOG ( tr ( " Could not open database [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
203
203
return false ;
204
204
}
205
205
206
206
// Check whether database is uptodate
207
207
OGRLayerH layer = OGR_DS_GetLayerByName ( mDs .get (), " drawing" );
208
208
if ( !layer )
209
209
{
210
- LOG ( QObject:: tr ( " Query for drawing %1 failed." ).arg ( drawing ) );
210
+ LOG ( tr ( " Query for drawing %1 failed." ).arg ( drawing ) );
211
211
mDs .reset ();
212
212
return false ;
213
213
}
@@ -221,26 +221,25 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
221
221
gdal::ogr_feature_unique_ptr f ( OGR_L_GetNextFeature ( layer ) );
222
222
if ( !f )
223
223
{
224
- LOG ( QObject:: tr ( " Could not retrieve drawing name from database [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
224
+ LOG ( tr ( " Could not retrieve drawing name from database [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
225
225
mDs .reset ();
226
226
return false ;
227
227
}
228
228
229
229
int year, month, day, hour, minute, second, tzf;
230
230
if ( !OGR_F_GetFieldAsDateTime ( f.get (), lastmodifiedIdx, &year, &month, &day, &hour, &minute, &second, &tzf ) )
231
231
{
232
- LOG ( QObject:: tr ( " Recorded last modification date unreadable [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
232
+ LOG ( tr ( " Recorded last modification date unreadable [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
233
233
mDs .reset ();
234
234
return false ;
235
235
}
236
236
237
-
238
237
#if 0
239
238
QDateTime lastModified( QDate( year, month, day ), QTime( hour, minute, second ) );
240
239
QString path = QString::fromUtf8( OGR_F_GetFieldAsString( f, pathIdx ) );
241
240
if ( path == fi.canonicalPath() && fi.lastModified() <= lastModified )
242
241
{
243
- LOG( QObject:: tr( "Drawing already uptodate in database." ) );
242
+ LOG( tr( "Drawing already uptodate in database." ) );
244
243
OGR_F_Destroy( f );
245
244
return true;
246
245
}
@@ -294,23 +293,23 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
294
293
295
294
296
295
QList<table> tables = QList<table>()
297
- << table ( QStringLiteral ( " drawing" ), QObject:: tr ( " Imported drawings" ), wkbNone, QList<field>()
296
+ << table ( QStringLiteral ( " drawing" ), tr ( " Imported drawings" ), wkbNone, QList<field>()
298
297
<< field ( QStringLiteral ( " path" ), OFTString )
299
298
<< field ( QStringLiteral ( " comments" ), OFTString )
300
299
<< field ( QStringLiteral ( " importdat" ), OFTDateTime )
301
300
<< field ( QStringLiteral ( " lastmodified" ), OFTDateTime )
302
301
<< field ( QStringLiteral ( " crs" ), OFTInteger )
303
302
)
304
- << table ( QStringLiteral ( " headers" ), QObject:: tr ( " Headers" ), wkbNone, QList<field>()
303
+ << table ( QStringLiteral ( " headers" ), tr ( " Headers" ), wkbNone, QList<field>()
305
304
<< field ( QStringLiteral ( " k" ), OFTString )
306
305
<< field ( QStringLiteral ( " v" ), OFTString )
307
306
)
308
- << table ( QStringLiteral ( " linetypes" ), QObject:: tr ( " Line types" ), wkbNone, QList<field>()
307
+ << table ( QStringLiteral ( " linetypes" ), tr ( " Line types" ), wkbNone, QList<field>()
309
308
<< field ( QStringLiteral ( " name" ), OFTString )
310
309
<< field ( QStringLiteral ( " desc" ), OFTString )
311
310
<< field ( QStringLiteral ( " path" ), OFTRealList )
312
311
)
313
- << table ( QStringLiteral ( " layers" ), QObject:: tr ( " Layer list" ), wkbNone, QList<field>()
312
+ << table ( QStringLiteral ( " layers" ), tr ( " Layer list" ), wkbNone, QList<field>()
314
313
<< field ( QStringLiteral ( " name" ), OFTString )
315
314
<< field ( QStringLiteral ( " linetype" ), OFTString )
316
315
<< field ( QStringLiteral ( " color" ), OFTString )
@@ -321,7 +320,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
321
320
<< field ( QStringLiteral ( " linewidth" ), OFTReal )
322
321
<< field ( QStringLiteral ( " flags" ), OFTInteger )
323
322
)
324
- << table ( QStringLiteral ( " dimstyles" ), QObject:: tr ( " Dimension styles" ), wkbNone, QList<field>()
323
+ << table ( QStringLiteral ( " dimstyles" ), tr ( " Dimension styles" ), wkbNone, QList<field>()
325
324
<< field ( QStringLiteral ( " name" ), OFTString )
326
325
<< field ( QStringLiteral ( " dimpost" ), OFTString )
327
326
<< field ( QStringLiteral ( " dimapost" ), OFTString )
@@ -392,7 +391,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
392
391
<< field ( QStringLiteral ( " dimlwd" ), OFTInteger )
393
392
<< field ( QStringLiteral ( " dimlwe" ), OFTInteger )
394
393
)
395
- << table ( QStringLiteral ( " textstyles" ), QObject:: tr ( " Text styles" ), wkbNone, QList<field>()
394
+ << table ( QStringLiteral ( " textstyles" ), tr ( " Text styles" ), wkbNone, QList<field>()
396
395
<< field ( QStringLiteral ( " name" ), OFTString )
397
396
<< field ( QStringLiteral ( " height" ), OFTReal )
398
397
<< field ( QStringLiteral ( " width" ), OFTReal )
@@ -403,36 +402,36 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
403
402
<< field ( QStringLiteral ( " bigFont" ), OFTString )
404
403
<< field ( QStringLiteral ( " fontFamily" ), OFTInteger )
405
404
)
406
- << table ( QStringLiteral ( " appdata" ), QObject:: tr ( " Application data" ), wkbNone, QList<field>()
405
+ << table ( QStringLiteral ( " appdata" ), tr ( " Application data" ), wkbNone, QList<field>()
407
406
<< field ( QStringLiteral ( " handle" ), OFTInteger )
408
407
<< field ( QStringLiteral ( " i" ), OFTInteger )
409
408
<< field ( QStringLiteral ( " value" ), OFTString )
410
409
)
411
- << table ( QStringLiteral ( " blocks" ), QObject:: tr ( " BLOCK entities" ), wkbPoint25D, QList<field>()
410
+ << table ( QStringLiteral ( " blocks" ), tr ( " BLOCK entities" ), wkbPoint25D, QList<field>()
412
411
ENTITY_ATTRIBUTES
413
412
<< field ( QStringLiteral ( " thickness" ), OFTReal )
414
413
<< field ( QStringLiteral ( " ext" ), OFTRealList )
415
414
<< field ( QStringLiteral ( " name" ), OFTString )
416
415
<< field ( QStringLiteral ( " flags" ), OFTInteger )
417
416
)
418
- << table ( QStringLiteral ( " points" ), QObject:: tr ( " POINT entities" ), wkbPoint25D, QList<field>()
417
+ << table ( QStringLiteral ( " points" ), tr ( " POINT entities" ), wkbPoint25D, QList<field>()
419
418
ENTITY_ATTRIBUTES
420
419
<< field ( QStringLiteral ( " thickness" ), OFTReal )
421
420
<< field ( QStringLiteral ( " ext" ), OFTRealList )
422
421
)
423
- << table ( QStringLiteral ( " lines" ), QObject:: tr ( " LINE entities" ), lineGeomType, QList<field>()
422
+ << table ( QStringLiteral ( " lines" ), tr ( " LINE entities" ), lineGeomType, QList<field>()
424
423
ENTITY_ATTRIBUTES
425
424
<< field ( QStringLiteral ( " thickness" ), OFTReal )
426
425
<< field ( QStringLiteral ( " ext" ), OFTRealList )
427
426
<< field ( QStringLiteral ( " width" ), OFTReal )
428
427
)
429
- << table ( QStringLiteral ( " polylines" ), QObject:: tr ( " POLYLINE entities" ), lineGeomType, QList<field>()
428
+ << table ( QStringLiteral ( " polylines" ), tr ( " POLYLINE entities" ), lineGeomType, QList<field>()
430
429
ENTITY_ATTRIBUTES
431
430
<< field ( QStringLiteral ( " width" ), OFTReal )
432
431
<< field ( QStringLiteral ( " thickness" ), OFTReal )
433
432
<< field ( QStringLiteral ( " ext" ), OFTRealList )
434
433
)
435
- << table ( QStringLiteral ( " texts" ), QObject:: tr ( " TEXT entities" ), wkbPoint25D, QList<field>()
434
+ << table ( QStringLiteral ( " texts" ), tr ( " TEXT entities" ), wkbPoint25D, QList<field>()
436
435
ENTITY_ATTRIBUTES
437
436
<< field ( QStringLiteral ( " thickness" ), OFTReal )
438
437
<< field ( QStringLiteral ( " ext" ), OFTRealList )
@@ -447,7 +446,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
447
446
<< field ( QStringLiteral ( " alignv" ), OFTInteger )
448
447
<< field ( QStringLiteral ( " interlin" ), OFTReal )
449
448
)
450
- << table ( QStringLiteral ( " hatches" ), QObject:: tr ( " HATCH entities" ), hatchGeomType, QList<field>()
449
+ << table ( QStringLiteral ( " hatches" ), tr ( " HATCH entities" ), hatchGeomType, QList<field>()
451
450
ENTITY_ATTRIBUTES
452
451
<< field ( QStringLiteral ( " thickness" ), OFTReal )
453
452
<< field ( QStringLiteral ( " ext" ), OFTRealList )
@@ -461,7 +460,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
461
460
<< field ( QStringLiteral ( " scale" ), OFTReal )
462
461
<< field ( QStringLiteral ( " deflines" ), OFTInteger )
463
462
)
464
- << table ( QStringLiteral ( " inserts" ), QObject:: tr ( " INSERT entities" ), wkbPoint25D, QList<field>()
463
+ << table ( QStringLiteral ( " inserts" ), tr ( " INSERT entities" ), wkbPoint25D, QList<field>()
465
464
ENTITY_ATTRIBUTES
466
465
<< field ( QStringLiteral ( " thickness" ), OFTReal )
467
466
<< field ( QStringLiteral ( " ext" ), OFTRealList )
@@ -480,15 +479,15 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
480
479
OGRSFDriverH driver = OGRGetDriverByName ( " GPKG" );
481
480
if ( !driver )
482
481
{
483
- LOG ( QObject:: tr ( " Could not load geopackage driver" ) );
482
+ LOG ( tr ( " Could not load geopackage driver" ) );
484
483
return false ;
485
484
}
486
485
487
486
// create database
488
487
mDs .reset ( OGR_Dr_CreateDataSource ( driver, mDatabase .toUtf8 ().constData (), nullptr ) );
489
488
if ( !mDs )
490
489
{
491
- LOG ( QObject:: tr ( " Creation of datasource failed [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
490
+ LOG ( tr ( " Creation of datasource failed [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
492
491
return false ;
493
492
}
494
493
@@ -511,7 +510,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
511
510
512
511
if ( !layer )
513
512
{
514
- LOG ( QObject:: tr ( " Creation of drawing layer %1 failed [%2]" ).arg ( t.mName , QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
513
+ LOG ( tr ( " Creation of drawing layer %1 failed [%2]" ).arg ( t.mName , QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
515
514
mDs .reset ();
516
515
return false ;
517
516
}
@@ -521,7 +520,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
521
520
gdal::ogr_field_def_unique_ptr fld ( OGR_Fld_Create ( f.mName .toUtf8 ().constData (), f.mOgrType ) );
522
521
if ( !fld )
523
522
{
524
- LOG ( QObject:: tr ( " Creation of field definition for %1.%2 failed [%3]" ).arg ( t.mName , f.mName , QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
523
+ LOG ( tr ( " Creation of field definition for %1.%2 failed [%3]" ).arg ( t.mName , f.mName , QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
525
524
mDs .reset ();
526
525
return false ;
527
526
}
@@ -535,7 +534,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
535
534
536
535
if ( res != OGRERR_NONE )
537
536
{
538
- LOG ( QObject:: tr ( " Creation of field %1.%2 failed [%3]" ).arg ( t.mName , f.mName , QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
537
+ LOG ( tr ( " Creation of field %1.%2 failed [%3]" ).arg ( t.mName , f.mName , QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
539
538
mDs .reset ();
540
539
return false ;
541
540
}
@@ -584,11 +583,11 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
584
583
585
584
if ( OGR_L_CreateFeature ( layer, f.get () ) != OGRERR_NONE )
586
585
{
587
- LOG ( QObject:: tr ( " Could not update drawing record [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
586
+ LOG ( tr ( " Could not update drawing record [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
588
587
return false ;
589
588
}
590
589
591
- LOG ( QObject:: tr ( " Updating database from %1 [%2]." ).arg ( drawing, fi.lastModified ().toString () ) );
590
+ LOG ( tr ( " Updating database from %1 [%2]." ).arg ( drawing, fi.lastModified ().toString () ) );
592
591
593
592
DRW::error result ( DRW::BAD_NONE );
594
593
@@ -612,51 +611,51 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
612
611
}
613
612
else
614
613
{
615
- LOG ( QObject:: tr ( " File %1 is not a DWG/DXF file" ).arg ( drawing ) );
614
+ LOG ( tr ( " File %1 is not a DWG/DXF file" ).arg ( drawing ) );
616
615
return false ;
617
616
}
618
617
619
618
switch ( result )
620
619
{
621
620
case DRW::BAD_NONE:
622
- error = QObject:: tr ( " No error." );
621
+ error = tr ( " No error." );
623
622
break ;
624
623
case DRW::BAD_UNKNOWN:
625
- error = QObject:: tr ( " Unknown error." );
624
+ error = tr ( " Unknown error." );
626
625
break ;
627
626
case DRW::BAD_OPEN:
628
- error = QObject:: tr ( " error opening file." );
627
+ error = tr ( " error opening file." );
629
628
break ;
630
629
case DRW::BAD_VERSION:
631
- error = QObject:: tr ( " unsupported version." );
630
+ error = tr ( " unsupported version." );
632
631
break ;
633
632
case DRW::BAD_READ_METADATA:
634
- error = QObject:: tr ( " error reading metadata." );
633
+ error = tr ( " error reading metadata." );
635
634
break ;
636
635
case DRW::BAD_READ_FILE_HEADER:
637
- error = QObject:: tr ( " error in file header read process." );
636
+ error = tr ( " error in file header read process." );
638
637
break ;
639
638
case DRW::BAD_READ_HEADER:
640
- error = QObject:: tr ( " error in header vars read process." );
639
+ error = tr ( " error in header vars read process." );
641
640
break ;
642
641
case DRW::BAD_READ_HANDLES:
643
- error = QObject:: tr ( " error in object map read process." );
642
+ error = tr ( " error in object map read process." );
644
643
break ;
645
644
case DRW::BAD_READ_CLASSES:
646
- error = QObject:: tr ( " error in classes read process." );
645
+ error = tr ( " error in classes read process." );
647
646
break ;
648
647
case DRW::BAD_READ_TABLES:
649
- error = QObject:: tr ( " error in tables read process." );
648
+ error = tr ( " error in tables read process." );
650
649
result = DRW::BAD_NONE;
651
650
break ;
652
651
case DRW::BAD_READ_BLOCKS:
653
- error = QObject:: tr ( " error in block read process." );
652
+ error = tr ( " error in block read process." );
654
653
break ;
655
654
case DRW::BAD_READ_ENTITIES:
656
- error = QObject:: tr ( " error in entities read process." );
655
+ error = tr ( " error in entities read process." );
657
656
break ;
658
657
case DRW::BAD_READ_OBJECTS:
659
- error = QObject:: tr ( " error in objects read process." );
658
+ error = tr ( " error in objects read process." );
660
659
break ;
661
660
}
662
661
@@ -689,7 +688,7 @@ void QgsDwgImporter::addHeader( const DRW_Header *data )
689
688
690
689
if ( OGR_L_SetFeature ( layer, f.get () ) != OGRERR_NONE )
691
690
{
692
- LOG ( QObject:: tr ( " Could not update comment in drawing record [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
691
+ LOG ( tr ( " Could not update comment in drawing record [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
693
692
return ;
694
693
}
695
694
}
@@ -743,10 +742,10 @@ void QgsDwgImporter::addHeader( const DRW_Header *data )
743
742
744
743
if ( OGR_L_CreateFeature ( layer, f.get () ) != OGRERR_NONE )
745
744
{
746
- LOG ( QObject:: tr ( " Could not add %3 %1 [%2]" )
745
+ LOG ( tr ( " Could not add %3 %1 [%2]" )
747
746
.arg ( k,
748
747
QString::fromUtf8 ( CPLGetLastErrorMsg () ),
749
- QObject:: tr ( " header record" ) )
748
+ tr ( " header record" ) )
750
749
);
751
750
}
752
751
}
@@ -778,7 +777,7 @@ void QgsDwgImporter::addLType( const DRW_LType &data )
778
777
779
778
if ( path[i] == 0.0 )
780
779
{
781
- NYI ( QObject:: tr ( " dotted linetypes - dot ignored" ) );
780
+ NYI ( tr ( " dotted linetypes - dot ignored" ) );
782
781
continue ;
783
782
}
784
783
@@ -814,10 +813,10 @@ void QgsDwgImporter::addLType( const DRW_LType &data )
814
813
815
814
if ( OGR_L_CreateFeature ( layer, f.get () ) != OGRERR_NONE )
816
815
{
817
- LOG ( QObject:: tr ( " Could not add %3 %1 [%2]" )
816
+ LOG ( tr ( " Could not add %3 %1 [%2]" )
818
817
.arg ( data.name .c_str (),
819
818
QString::fromUtf8 ( CPLGetLastErrorMsg () ),
820
- QObject:: tr ( " line type" ) )
819
+ tr ( " line type" ) )
821
820
);
822
821
}
823
822
}
@@ -904,8 +903,8 @@ void QgsDwgImporter::addLayer( const DRW_Layer &data )
904
903
905
904
if ( OGR_L_CreateFeature ( layer, f.get () ) != OGRERR_NONE )
906
905
{
907
- LOG ( QObject:: tr ( " Could not add %3 %1 [%2]" )
908
- .arg ( data.name .c_str (), QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " layer" ) )
906
+ LOG ( tr ( " Could not add %3 %1 [%2]" )
907
+ .arg ( data.name .c_str (), QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " layer" ) )
909
908
);
910
909
}
911
910
}
@@ -915,7 +914,7 @@ void QgsDwgImporter::setString( OGRFeatureDefnH dfn, OGRFeatureH f, const QStrin
915
914
int idx = OGR_FD_GetFieldIndex ( dfn, field.toLower ().toUtf8 ().constData () );
916
915
if ( idx < 0 )
917
916
{
918
- LOG ( QObject:: tr ( " Field %1 not found" ).arg ( field ) );
917
+ LOG ( tr ( " Field %1 not found" ).arg ( field ) );
919
918
return ;
920
919
}
921
920
OGR_F_SetFieldString ( f, idx, value.c_str () );
@@ -926,7 +925,7 @@ void QgsDwgImporter::setDouble( OGRFeatureDefnH dfn, OGRFeatureH f, const QStrin
926
925
int idx = OGR_FD_GetFieldIndex ( dfn, field.toLower ().toUtf8 ().constData () );
927
926
if ( idx < 0 )
928
927
{
929
- LOG ( QObject:: tr ( " Field %1 not found" ).arg ( field ) );
928
+ LOG ( tr ( " Field %1 not found" ).arg ( field ) );
930
929
return ;
931
930
}
932
931
OGR_F_SetFieldDouble ( f, idx, value );
@@ -937,7 +936,7 @@ void QgsDwgImporter::setInteger( OGRFeatureDefnH dfn, OGRFeatureH f, const QStri
937
936
int idx = OGR_FD_GetFieldIndex ( dfn, field.toLower ().toUtf8 ().constData () );
938
937
if ( idx < 0 )
939
938
{
940
- LOG ( QObject:: tr ( " Field %1 not found" ).arg ( field ) );
939
+ LOG ( tr ( " Field %1 not found" ).arg ( field ) );
941
940
return ;
942
941
}
943
942
OGR_F_SetFieldInteger ( f, idx, value );
@@ -953,7 +952,7 @@ void QgsDwgImporter::setPoint( OGRFeatureDefnH dfn, OGRFeatureH f, const QString
953
952
int idx = OGR_FD_GetFieldIndex ( dfn, field.toLower ().toUtf8 ().constData () );
954
953
if ( idx < 0 )
955
954
{
956
- LOG ( QObject:: tr ( " Field %1 not found" ).arg ( field ) );
955
+ LOG ( tr ( " Field %1 not found" ).arg ( field ) );
957
956
return ;
958
957
}
959
958
@@ -1018,7 +1017,7 @@ double QgsDwgImporter::lineWidth( int lWeight, const std::string &layer ) const
1018
1017
return -1.0 ;
1019
1018
case 31 :
1020
1019
default :
1021
- NYI ( QObject:: tr ( " Line width default" ) );
1020
+ NYI ( tr ( " Line width default" ) );
1022
1021
return 0.0 ;
1023
1022
}
1024
1023
}
@@ -1104,8 +1103,8 @@ void QgsDwgImporter::addDimStyle( const DRW_Dimstyle &data )
1104
1103
1105
1104
if ( OGR_L_CreateFeature ( layer, f.get () ) != OGRERR_NONE )
1106
1105
{
1107
- LOG ( QObject:: tr ( " Could not add %3 %1 [%2]" )
1108
- .arg ( data.name .c_str (), QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " dimension style" ) )
1106
+ LOG ( tr ( " Could not add %3 %1 [%2]" )
1107
+ .arg ( data.name .c_str (), QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " dimension style" ) )
1109
1108
);
1110
1109
}
1111
1110
}
@@ -1136,8 +1135,8 @@ void QgsDwgImporter::addTextStyle( const DRW_Textstyle &data )
1136
1135
1137
1136
if ( OGR_L_CreateFeature ( layer, f.get () ) != OGRERR_NONE )
1138
1137
{
1139
- LOG ( QObject:: tr ( " Could not add %3 %1 [%2]" )
1140
- .arg ( data.name .c_str (), QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " text style" ) )
1138
+ LOG ( tr ( " Could not add %3 %1 [%2]" )
1139
+ .arg ( data.name .c_str (), QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " text style" ) )
1141
1140
);
1142
1141
}
1143
1142
}
@@ -1166,7 +1165,9 @@ bool QgsDwgImporter::createFeature( OGRLayerH layer, OGRFeatureH f, const QgsAbs
1166
1165
OGRGeometryH geom;
1167
1166
if ( OGR_G_CreateFromWkb ( ( unsigned char * ) wkb.constData (), nullptr , &geom, wkb.size () ) != OGRERR_NONE )
1168
1167
{
1169
- LOG ( QObject::tr ( " Could not create geometry [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
1168
+ QgsDebugMsg ( QStringLiteral ( " Could not create geometry [%1][%2]" ).arg ( g->asWkt () ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
1169
+ LOG ( tr ( " Could not create geometry [%1]" ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ) );
1170
+ return false ;
1170
1171
}
1171
1172
1172
1173
OGR_F_SetGeometryDirectly ( f, geom );
@@ -1197,8 +1198,8 @@ void QgsDwgImporter::addBlock( const DRW_Block &data )
1197
1198
1198
1199
if ( !createFeature ( layer, f.get (), p ) )
1199
1200
{
1200
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1201
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " block" ) )
1201
+ LOG ( tr ( " Could not add %2 [%1]" )
1202
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " block" ) )
1202
1203
);
1203
1204
}
1204
1205
}
@@ -1257,22 +1258,22 @@ void QgsDwgImporter::addPoint( const DRW_Point &data )
1257
1258
QgsPoint p ( QgsWkbTypes::PointZ, data.basePoint .x , data.basePoint .y , data.basePoint .z );
1258
1259
if ( !createFeature ( layer, f, p ) )
1259
1260
{
1260
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1261
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " point" ) )
1261
+ LOG ( tr ( " Could not add %2 [%1]" )
1262
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " point" ) )
1262
1263
);
1263
1264
}
1264
1265
}
1265
1266
1266
1267
void QgsDwgImporter::addRay ( const DRW_Ray &data )
1267
1268
{
1268
1269
Q_UNUSED ( data );
1269
- NYI ( QObject:: tr ( " RAY entities" ) );
1270
+ NYI ( tr ( " RAY entities" ) );
1270
1271
}
1271
1272
1272
1273
void QgsDwgImporter::addXline ( const DRW_Xline &data )
1273
1274
{
1274
1275
Q_UNUSED ( data );
1275
- NYI ( QObject:: tr ( " XLINE entities" ) );
1276
+ NYI ( tr ( " XLINE entities" ) );
1276
1277
}
1277
1278
1278
1279
bool QgsDwgImporter::circularStringFromArc ( const DRW_Arc &data, QgsCircularString &c )
@@ -1299,8 +1300,8 @@ void QgsDwgImporter::addArc( const DRW_Arc &data )
1299
1300
QgsCircularString c;
1300
1301
if ( !circularStringFromArc ( data, c ) )
1301
1302
{
1302
- LOG ( QObject:: tr ( " Could not create circular string from %2 [%1]" )
1303
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " arc" ) )
1303
+ LOG ( tr ( " Could not create circular string from %2 [%1]" )
1304
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " arc" ) )
1304
1305
);
1305
1306
return ;
1306
1307
}
@@ -1319,8 +1320,8 @@ void QgsDwgImporter::addArc( const DRW_Arc &data )
1319
1320
1320
1321
if ( !createFeature ( layer, f, c ) )
1321
1322
{
1322
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1323
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " arc" ) )
1323
+ LOG ( tr ( " Could not add %2 [%1]" )
1324
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " arc" ) )
1324
1325
);
1325
1326
}
1326
1327
}
@@ -1349,8 +1350,8 @@ void QgsDwgImporter::addCircle( const DRW_Circle &data )
1349
1350
1350
1351
if ( !createFeature ( layer, f, c ) )
1351
1352
{
1352
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1353
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " circle" ) )
1353
+ LOG ( tr ( " Could not add %2 [%1]" )
1354
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " circle" ) )
1354
1355
);
1355
1356
}
1356
1357
}
@@ -1500,8 +1501,8 @@ void QgsDwgImporter::addLWPolyline( const DRW_LWPolyline &data )
1500
1501
1501
1502
if ( !createFeature ( layer, f, cc ) )
1502
1503
{
1503
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1504
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " line string" ) )
1504
+ LOG ( tr ( " Could not add %2 [%1]" )
1505
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " line string" ) )
1505
1506
);
1506
1507
}
1507
1508
@@ -1571,8 +1572,8 @@ void QgsDwgImporter::addLWPolyline( const DRW_LWPolyline &data )
1571
1572
1572
1573
if ( !createFeature ( layer, f, poly ) )
1573
1574
{
1574
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1575
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " polygon" ) )
1575
+ LOG ( tr ( " Could not add %2 [%1]" )
1576
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " polygon" ) )
1576
1577
);
1577
1578
}
1578
1579
}
@@ -1615,8 +1616,8 @@ void QgsDwgImporter::addLWPolyline( const DRW_LWPolyline &data )
1615
1616
1616
1617
if ( !createFeature ( layer, f, cc ) )
1617
1618
{
1618
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1619
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " line string" ) )
1619
+ LOG ( tr ( " Could not add %2 [%1]" )
1620
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " line string" ) )
1620
1621
);
1621
1622
}
1622
1623
}
@@ -1696,8 +1697,8 @@ void QgsDwgImporter::addPolyline( const DRW_Polyline &data )
1696
1697
1697
1698
if ( !createFeature ( layer, f, cc ) )
1698
1699
{
1699
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1700
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " line string" ) )
1700
+ LOG ( tr ( " Could not add %2 [%1]" )
1701
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " line string" ) )
1701
1702
);
1702
1703
}
1703
1704
@@ -1772,8 +1773,8 @@ void QgsDwgImporter::addPolyline( const DRW_Polyline &data )
1772
1773
1773
1774
if ( !createFeature ( layer, f, poly ) )
1774
1775
{
1775
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1776
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " polygon" ) )
1776
+ LOG ( tr ( " Could not add %2 [%1]" )
1777
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " polygon" ) )
1777
1778
);
1778
1779
}
1779
1780
}
@@ -1816,8 +1817,8 @@ void QgsDwgImporter::addPolyline( const DRW_Polyline &data )
1816
1817
1817
1818
if ( !createFeature ( layer, f, cc ) )
1818
1819
{
1819
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
1820
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " line string" ) )
1820
+ LOG ( tr ( " Could not add %2 [%1]" )
1821
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " line string" ) )
1821
1822
);
1822
1823
}
1823
1824
}
@@ -2054,8 +2055,8 @@ void QgsDwgImporter::addSpline( const DRW_Spline *data )
2054
2055
QgsLineString l;
2055
2056
if ( !lineFromSpline ( *data, l ) )
2056
2057
{
2057
- LOG ( QObject:: tr ( " Could not create line from %2 [%1]" )
2058
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " spline" ) )
2058
+ LOG ( tr ( " Could not create line from %2 [%1]" )
2059
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " spline" ) )
2059
2060
);
2060
2061
return ;
2061
2062
}
@@ -2071,16 +2072,16 @@ void QgsDwgImporter::addSpline( const DRW_Spline *data )
2071
2072
2072
2073
if ( !createFeature ( layer, f, l ) )
2073
2074
{
2074
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
2075
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " spline" ) )
2075
+ LOG ( tr ( " Could not add %2 [%1]" )
2076
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " spline" ) )
2076
2077
);
2077
2078
}
2078
2079
}
2079
2080
2080
2081
void QgsDwgImporter::addKnot ( const DRW_Entity &data )
2081
2082
{
2082
2083
Q_UNUSED ( data );
2083
- NYI ( QObject:: tr ( " KNOT entities" ) );
2084
+ NYI ( tr ( " KNOT entities" ) );
2084
2085
}
2085
2086
2086
2087
void QgsDwgImporter::addInsert ( const DRW_Insert &data )
@@ -2112,22 +2113,22 @@ void QgsDwgImporter::addInsert( const DRW_Insert &data )
2112
2113
2113
2114
if ( !createFeature ( layer, f, p ) )
2114
2115
{
2115
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
2116
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " point" ) )
2116
+ LOG ( tr ( " Could not add %2 [%1]" )
2117
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " point" ) )
2117
2118
);
2118
2119
}
2119
2120
}
2120
2121
2121
2122
void QgsDwgImporter::addTrace ( const DRW_Trace &data )
2122
2123
{
2123
2124
Q_UNUSED ( data );
2124
- NYI ( QObject:: tr ( " TRACE entities" ) );
2125
+ NYI ( tr ( " TRACE entities" ) );
2125
2126
}
2126
2127
2127
2128
void QgsDwgImporter::add3dFace ( const DRW_3Dface &data )
2128
2129
{
2129
2130
Q_UNUSED ( data );
2130
- NYI ( QObject:: tr ( " 3DFACE entities" ) );
2131
+ NYI ( tr ( " 3DFACE entities" ) );
2131
2132
}
2132
2133
2133
2134
void QgsDwgImporter::addSolid ( const DRW_Solid &data )
@@ -2163,8 +2164,8 @@ void QgsDwgImporter::addSolid( const DRW_Solid &data )
2163
2164
2164
2165
if ( !createFeature ( layer, f, poly ) )
2165
2166
{
2166
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
2167
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " polygon" ) )
2167
+ LOG ( tr ( " Could not add %2 [%1]" )
2168
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " polygon" ) )
2168
2169
);
2169
2170
}
2170
2171
}
@@ -2198,8 +2199,8 @@ void QgsDwgImporter::addMText( const DRW_MText &data )
2198
2199
2199
2200
if ( !createFeature ( layer, f, p ) )
2200
2201
{
2201
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
2202
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " point" ) )
2202
+ LOG ( tr ( " Could not add %2 [%1]" )
2203
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " point" ) )
2203
2204
);
2204
2205
}
2205
2206
}
@@ -2236,58 +2237,58 @@ void QgsDwgImporter::addText( const DRW_Text &data )
2236
2237
2237
2238
if ( !createFeature ( layer, f, p ) )
2238
2239
{
2239
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
2240
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " point" ) )
2240
+ LOG ( tr ( " Could not add %2 [%1]" )
2241
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " point" ) )
2241
2242
);
2242
2243
}
2243
2244
}
2244
2245
2245
2246
void QgsDwgImporter::addDimAlign ( const DRW_DimAligned *data )
2246
2247
{
2247
2248
Q_UNUSED ( data );
2248
- NYI ( QObject:: tr ( " DIMALIGN entities" ) );
2249
+ NYI ( tr ( " DIMALIGN entities" ) );
2249
2250
}
2250
2251
2251
2252
void QgsDwgImporter::addDimLinear ( const DRW_DimLinear *data )
2252
2253
{
2253
2254
Q_UNUSED ( data );
2254
- NYI ( QObject:: tr ( " DIMLINEAR entities" ) );
2255
+ NYI ( tr ( " DIMLINEAR entities" ) );
2255
2256
}
2256
2257
2257
2258
void QgsDwgImporter::addDimRadial ( const DRW_DimRadial *data )
2258
2259
{
2259
2260
Q_UNUSED ( data );
2260
- NYI ( QObject:: tr ( " DIMRADIAL entities" ) );
2261
+ NYI ( tr ( " DIMRADIAL entities" ) );
2261
2262
}
2262
2263
2263
2264
void QgsDwgImporter::addDimDiametric ( const DRW_DimDiametric *data )
2264
2265
{
2265
2266
Q_UNUSED ( data );
2266
- NYI ( QObject:: tr ( " DIMDIAMETRIC entities" ) );
2267
+ NYI ( tr ( " DIMDIAMETRIC entities" ) );
2267
2268
}
2268
2269
2269
2270
void QgsDwgImporter::addDimAngular ( const DRW_DimAngular *data )
2270
2271
{
2271
2272
Q_UNUSED ( data );
2272
- NYI ( QObject:: tr ( " DIMANGULAR entities" ) );
2273
+ NYI ( tr ( " DIMANGULAR entities" ) );
2273
2274
}
2274
2275
2275
2276
void QgsDwgImporter::addDimAngular3P ( const DRW_DimAngular3p *data )
2276
2277
{
2277
2278
Q_UNUSED ( data );
2278
- NYI ( QObject:: tr ( " DIMANGULAR3P entities" ) );
2279
+ NYI ( tr ( " DIMANGULAR3P entities" ) );
2279
2280
}
2280
2281
2281
2282
void QgsDwgImporter::addDimOrdinate ( const DRW_DimOrdinate *data )
2282
2283
{
2283
2284
Q_UNUSED ( data );
2284
- NYI ( QObject:: tr ( " DIMORDINAL entities" ) );
2285
+ NYI ( tr ( " DIMORDINAL entities" ) );
2285
2286
}
2286
2287
2287
2288
void QgsDwgImporter::addLeader ( const DRW_Leader *data )
2288
2289
{
2289
2290
Q_UNUSED ( data );
2290
- NYI ( QObject:: tr ( " LEADER entities" ) );
2291
+ NYI ( tr ( " LEADER entities" ) );
2291
2292
}
2292
2293
2293
2294
void QgsDwgImporter::addHatch ( const DRW_Hatch *pdata )
@@ -2322,7 +2323,7 @@ void QgsDwgImporter::addHatch( const DRW_Hatch *pdata )
2322
2323
2323
2324
if ( data.looplist .size () != data.loopsnum )
2324
2325
{
2325
- LOG ( QObject:: tr ( " 0x%1: %2 instead of %3 loops found" )
2326
+ LOG ( tr ( " 0x%1: %2 instead of %3 loops found" )
2326
2327
.arg ( data.handle , 0 , 16 )
2327
2328
.arg ( data.looplist .size () )
2328
2329
.arg ( data.loopsnum )
@@ -2400,8 +2401,8 @@ void QgsDwgImporter::addHatch( const DRW_Hatch *pdata )
2400
2401
2401
2402
if ( !createFeature ( layer, f, p ) )
2402
2403
{
2403
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
2404
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " polygon" ) )
2404
+ LOG ( tr ( " Could not add %2 [%1]" )
2405
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " polygon" ) )
2405
2406
);
2406
2407
}
2407
2408
}
@@ -2429,34 +2430,34 @@ void QgsDwgImporter::addLine( const DRW_Line &data )
2429
2430
2430
2431
if ( !createFeature ( layer, f, l ) )
2431
2432
{
2432
- LOG ( QObject:: tr ( " Could not add %2 [%1]" )
2433
- .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), QObject:: tr ( " line string" ) )
2433
+ LOG ( tr ( " Could not add %2 [%1]" )
2434
+ .arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ), tr ( " line string" ) )
2434
2435
);
2435
2436
}
2436
2437
}
2437
2438
2438
2439
void QgsDwgImporter::addViewport ( const DRW_Viewport &data )
2439
2440
{
2440
2441
Q_UNUSED ( data );
2441
- NYI ( QObject:: tr ( " VIEWPORT entities" ) );
2442
+ NYI ( tr ( " VIEWPORT entities" ) );
2442
2443
}
2443
2444
2444
2445
void QgsDwgImporter::addImage ( const DRW_Image *data )
2445
2446
{
2446
2447
Q_UNUSED ( data );
2447
- NYI ( QObject:: tr ( " IMAGE entities" ) );
2448
+ NYI ( tr ( " IMAGE entities" ) );
2448
2449
}
2449
2450
2450
2451
void QgsDwgImporter::linkImage ( const DRW_ImageDef *data )
2451
2452
{
2452
2453
Q_UNUSED ( data );
2453
- NYI ( QObject:: tr ( " image links" ) );
2454
+ NYI ( tr ( " image links" ) );
2454
2455
}
2455
2456
2456
2457
void QgsDwgImporter::addComment ( const char *comment )
2457
2458
{
2458
2459
Q_UNUSED ( comment );
2459
- NYI ( QObject:: tr ( " comments" ) );
2460
+ NYI ( tr ( " comments" ) );
2460
2461
}
2461
2462
2462
2463
void QgsDwgImporter::writeHeader ( DRW_Header & ) { }
@@ -2702,13 +2703,13 @@ bool QgsDwgImporter::expandInserts( QString &error )
2702
2703
{
2703
2704
if ( errors < 1000 )
2704
2705
{
2705
- QgsMessageLog::logMessage ( QObject:: tr ( " Could not copy feature of block %2 from layer %1 [Errors: %3]" )
2706
+ QgsMessageLog::logMessage ( tr ( " Could not copy feature of block %2 from layer %1 [Errors: %3]" )
2706
2707
.arg ( name ).arg ( handle ).arg ( QString::fromUtf8 ( CPLGetLastErrorMsg () ) ),
2707
- QObject:: tr ( " DWG/DXF import" ) );
2708
+ tr ( " DWG/DXF import" ) );
2708
2709
}
2709
2710
else if ( errors == 1000 )
2710
2711
{
2711
- QgsMessageLog::logMessage ( QObject:: tr ( " Not logging more errors" ), QObject:: tr ( " DWG/DXF import" ) );
2712
+ QgsMessageLog::logMessage ( tr ( " Not logging more errors" ), tr ( " DWG/DXF import" ) );
2712
2713
}
2713
2714
2714
2715
++errors;
@@ -2726,12 +2727,12 @@ bool QgsDwgImporter::expandInserts( QString &error )
2726
2727
2727
2728
if ( errors > 0 )
2728
2729
{
2729
- error = QObject:: tr ( " %1 write errors during block expansion" ).arg ( errors );
2730
+ error = tr ( " %1 write errors during block expansion" ).arg ( errors );
2730
2731
return false ;
2731
2732
}
2732
2733
else
2733
2734
{
2734
- error = QObject:: tr ( " %1 block insertion expanded." ).arg ( i );
2735
+ error = tr ( " %1 block insertion expanded." ).arg ( i );
2735
2736
return true ;
2736
2737
}
2737
2738
}
0 commit comments