Skip to content

Commit a102490

Browse files
committed
fix windows warnings
1 parent 27dbb48 commit a102490

File tree

16 files changed

+30
-40
lines changed

16 files changed

+30
-40
lines changed

CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,13 +519,6 @@ IF (WITH_CORE)
519519
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
520520
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNINGS)
521521

522-
IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
523-
IF (NOT USING_NMAKE AND NOT USING_NINJA)
524-
MESSAGE (STATUS "Generating browse files")
525-
ADD_DEFINITIONS( /FR )
526-
ENDIF (NOT USING_NMAKE AND NOT USING_NINJA)
527-
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
528-
529522
IF (INSTALL_DEPS)
530523
INSTALL(DIRECTORY ${INSTALL_DEPS} DESTINATION .)
531524
ENDIF (INSTALL_DEPS)

python/server/qgsserver.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ Returns a pointer to the server interface
7070
:rtype: QgsServer
7171
%End
7272
};
73-
7473
/************************************************************************
7574
* This file has been generated automatically from *
7675
* *

src/app/layout/qgslayoutmapwidget.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,6 @@ QgsLayoutItemMapOverview *QgsLayoutMapWidget::currentOverview()
14121412
}
14131413

14141414
return mMapItem->overviews()->overview( item->data( Qt::UserRole ).toString() );
1415-
return nullptr;
14161415
}
14171416

14181417
void QgsLayoutMapWidget::mOverviewListWidget_currentItemChanged( QListWidgetItem *current, QListWidgetItem *previous )

src/app/qgisapp.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12112,10 +12112,7 @@ void QgisApp::keyPressEvent( QKeyEvent *e )
1211212112
#if defined(_MSC_VER) && defined(QGISDEBUG)
1211312113
else if ( e->key() == Qt::Key_Backslash && e->modifiers() & Qt::ControlModifier )
1211412114
{
12115-
int *i;
12116-
*i = 10;
12117-
// *((int*)0 + 1) = 5;
12118-
// QgsCrashHandler::handle( 0 );
12115+
abort();
1211912116
}
1212012117
#endif
1212112118
else

src/app/qgsmaptoollabel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ QString QgsMapToolLabel::currentLabelText( int trunc )
146146
if ( trunc > 0 && labelText.length() > trunc )
147147
{
148148
labelText.truncate( trunc );
149-
labelText += QStringLiteral( "\u2026" );
149+
labelText += QChar( 0x2026 );
150150
}
151151
return labelText;
152152
}
@@ -169,7 +169,7 @@ QString QgsMapToolLabel::currentLabelText( int trunc )
169169
if ( trunc > 0 && labelText.length() > trunc )
170170
{
171171
labelText.truncate( trunc );
172-
labelText += QStringLiteral( "\u2026" );
172+
labelText += QChar( 0x2026 );
173173
}
174174
return labelText;
175175
}

src/app/qgsmaptoolmovelabel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void QgsMapToolMoveLabel::canvasPressEvent( QgsMapMouseEvent *e )
5454
return;
5555
}
5656

57-
int xCol, yCol;
57+
int xCol = -1, yCol = -1;
5858

5959
if ( !mCurrentLabel.pos.isDiagram && !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol ) )
6060
{

src/core/expression/qgsexpression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ QString QgsExpression::helpText( QString name )
561561

562562
if ( v.mVariableLenArguments )
563563
{
564-
helpContents += QStringLiteral( "\u2026" );
564+
helpContents += QChar( 0x2026 );
565565
}
566566

567567
helpContents += ')';

src/crashhandler/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int main( int argc, char *argv[] )
3232
if ( argc < 2 )
3333
{
3434
std::cout << "QGIS Crash Handler Usage: \n"
35-
<< "qgscrashhandler {infofile}" << std::endl;
35+
<< "qgiscrashhandler {infofile}" << std::endl;
3636
return -1;
3737
}
3838

@@ -73,7 +73,7 @@ int main( int argc, char *argv[] )
7373
sscanf_s( exceptionPointersString.toLocal8Bit().constData(), "%p", &exception );
7474

7575
std::cout << "Process ID: " << processIdString.toLocal8Bit().constData() << std::endl;
76-
std::cout << "Trhead ID:" << threadIdString.toLocal8Bit().constData() << std::endl;
76+
std::cout << "Thread ID:" << threadIdString.toLocal8Bit().constData() << std::endl;
7777
std::cout << "Exception Pointer: " << exceptionPointersString.toLocal8Bit().constData() << std::endl;
7878
std::cout << "Symbol Path :" << symbolPaths.toUtf8().data() << std::endl;
7979

src/gui/qgsattributeformeditorwidget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,17 @@ void QgsAttributeFormEditorWidget::setConstraintStatus( const QString &constrain
143143
switch ( result )
144144
{
145145
case QgsEditorWidgetWrapper::ConstraintResultFailHard:
146-
mConstraintResultLabel->setText( QStringLiteral( "<font color=\"#FF9800\">\u2718</font>" ) );
146+
mConstraintResultLabel->setText( QStringLiteral( "<font color=\"#FF9800\">%1</font>" ).arg( QChar( 0x2718 ) ) );
147147
mConstraintResultLabel->setToolTip( description.isEmpty() ? QStringLiteral( "<b>%1</b>: %2" ).arg( constraint, err ) : description );
148148
break;
149149

150150
case QgsEditorWidgetWrapper::ConstraintResultFailSoft:
151-
mConstraintResultLabel->setText( QStringLiteral( "<font color=\"#FFC107\">\u2718</font>" ) );
151+
mConstraintResultLabel->setText( QStringLiteral( "<font color=\"#FFC107\">%1</font>" ).arg( QChar( 0x2718 ) ) );
152152
mConstraintResultLabel->setToolTip( description.isEmpty() ? QStringLiteral( "<b>%1</b>: %2" ).arg( constraint, err ) : description );
153153
break;
154154

155155
case QgsEditorWidgetWrapper::ConstraintResultPass:
156-
mConstraintResultLabel->setText( QStringLiteral( "<font color=\"#259b24\">\u2714</font>" ) );
156+
mConstraintResultLabel->setText( QStringLiteral( "<font color=\"#259B24\">%1</font>" ).arg( QChar( 0x2714 ) ) );
157157
mConstraintResultLabel->setToolTip( QString() );
158158
break;
159159
}

src/gui/qgsfilewidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ QgsFileWidget::QgsFileWidget( QWidget *parent )
5656
mLayout->addWidget( mLineEdit );
5757

5858
mFileWidgetButton = new QToolButton( this );
59-
mFileWidgetButton->setText( QStringLiteral( "\u2026" ) );
59+
mFileWidgetButton->setText( QChar( 0x2026 ) );
6060
connect( mFileWidgetButton, &QAbstractButton::clicked, this, &QgsFileWidget::openFileDialog );
6161
mLayout->addWidget( mFileWidgetButton );
6262

0 commit comments

Comments
 (0)