Skip to content

Commit

Permalink
Switch to C++ 17
Browse files Browse the repository at this point in the history
Supported on all target platforms. More warnings, nodiscard, std::byte
and other good things to write cleaner code.
  • Loading branch information
variar committed May 11, 2021
1 parent 95295ae commit d5ea595
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${out_dir}")

set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
6 changes: 1 addition & 5 deletions src/ui/src/crawlerwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,7 @@ void CrawlerWidget::applyConfiguration()

// Necessary on systems doing subpixel positionning (e.g. Ubuntu 12.04)
if ( config.forceFontAntialiasing() ) {
font.setStyleStrategy( static_cast<QFont::StyleStrategy>( QFont::ForceIntegerMetrics
| QFont::PreferAntialias ) );
}
else {
font.setStyleStrategy( QFont::ForceIntegerMetrics );
font.setStyleStrategy( QFont::PreferAntialias );
}

logMainView->setFont( font );
Expand Down
2 changes: 1 addition & 1 deletion src/ui/src/infoline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void InfoLine::displayGauge( int completion )
// Create a gradient for the progress bar
QLinearGradient linearGrad( changeoverX - 1, 0, changeoverX + 1, 0 );
linearGrad.setColorAt( 0, origPalette_->color( QPalette::Highlight ) );
linearGrad.setColorAt( 1, origPalette_->color( QPalette::Background ) );
linearGrad.setColorAt( 1, origPalette_->color( QPalette::Window ) );

// Apply the gradient to the current palette (background)
QPalette newPalette = *origPalette_;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/src/tabbedcrawlerwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void TabbedCrawlerWidget::mouseReleaseEvent( QMouseEvent* event )
{
LOG_DEBUG << "TabbedCrawlerWidget::mouseReleaseEvent";

if ( event->button() == Qt::MidButton ) {
if ( event->button() == Qt::MiddleButton ) {
int tab = this->myTabBar_.tabAt( event->pos() );
if ( -1 != tab ) {
emit tabCloseRequested( tab );
Expand Down

0 comments on commit d5ea595

Please sign in to comment.