diff options
Diffstat (limited to 'src/gvcore')
-rw-r--r-- | src/gvcore/filedetailview.cpp | 6 | ||||
-rw-r--r-- | src/gvcore/filethumbnailviewitem.cpp | 4 | ||||
-rw-r--r-- | src/gvcore/mngformattype.cpp | 53 | ||||
-rw-r--r-- | src/gvcore/qxcfi.cpp | 4 | ||||
-rw-r--r-- | src/gvcore/slideshow.cpp | 4 |
5 files changed, 36 insertions, 35 deletions
diff --git a/src/gvcore/filedetailview.cpp b/src/gvcore/filedetailview.cpp index 2a73176..b3ff35b 100644 --- a/src/gvcore/filedetailview.cpp +++ b/src/gvcore/filedetailview.cpp @@ -306,13 +306,13 @@ void FileDetailView::slotSortingChanged( int col ) switch( col ) { case COL_NAME: - sortSpec = (sort & ~TQDir::SortByMask | TQDir::Name); + sortSpec = ((sort & ~TQDir::SortByMask) | TQDir::Name); break; case COL_SIZE: - sortSpec = (sort & ~TQDir::SortByMask | TQDir::Size); + sortSpec = ((sort & ~TQDir::SortByMask) | TQDir::Size); break; case COL_DATE: - sortSpec = (sort & ~TQDir::SortByMask | TQDir::Time); + sortSpec = ((sort & ~TQDir::SortByMask) | TQDir::Time); break; // the following columns have no equivalent in TQDir, so we set it diff --git a/src/gvcore/filethumbnailviewitem.cpp b/src/gvcore/filethumbnailviewitem.cpp index 899bffd..46a79ca 100644 --- a/src/gvcore/filethumbnailviewitem.cpp +++ b/src/gvcore/filethumbnailviewitem.cpp @@ -319,13 +319,11 @@ void FileThumbnailViewItem::paintItem(TQPainter *p, const TQColorGroup &cg) { bool isRight=view->itemTextPos()==TQIconView::Right; bool isShownItem=view->shownFileItem() && view->shownFileItem()->extraData(view)==this; bool isImage=!Archive::fileItemIsDirOrArchive(mFileItem); - int textX, textY, textW, textH; + int textX, textY; int thumbnailSize=FileViewConfig::thumbnailSize(); textX=textRect(false).x(); textY=textRect(false).y(); - textW=textRect(false).width(); - textH=textRect(false).height(); // Draw pixmap TQRect pRect = pixmapRect(false); diff --git a/src/gvcore/mngformattype.cpp b/src/gvcore/mngformattype.cpp index fa1e445..2ce2f1c 100644 --- a/src/gvcore/mngformattype.cpp +++ b/src/gvcore/mngformattype.cpp @@ -293,34 +293,35 @@ TQImageFormat* MNGFormatType::decoderFor( const uchar* buffer, int length ) { if (length < 8) return 0; - if (buffer[0]==138 // MNG signature - && buffer[1]=='M' - && buffer[2]=='N' - && buffer[3]=='G' - && buffer[4]==13 - && buffer[5]==10 - && buffer[6]==26 - && buffer[7]==10 - || buffer[0]==139 // JNG signature - && buffer[1]=='J' - && buffer[2]=='N' - && buffer[3]=='G' - && buffer[4]==13 - && buffer[5]==10 - && buffer[6]==26 - && buffer[7]==10 + if ( ( buffer[0]==138 // MNG signature + && buffer[1]=='M' + && buffer[2]=='N' + && buffer[3]=='G' + && buffer[4]==13 + && buffer[5]==10 + && buffer[6]==26 + && buffer[7]==10 ) + || ( buffer[0]==139 // JNG signature + && buffer[1]=='J' + && buffer[2]=='N' + && buffer[3]=='G' + && buffer[4]==13 + && buffer[5]==10 + && buffer[6]==26 + && buffer[7]==10 ) #ifdef TQT_NO_IMAGEIO_PNG // if we don't have native PNG support use libmng - || buffer[0]==137 // PNG signature - && buffer[1]=='P' - && buffer[2]=='N' - && buffer[3]=='G' - && buffer[4]==13 - && buffer[5]==10 - && buffer[6]==26 - && buffer[7]==10 + || ( buffer[0]==137 // PNG signature + && buffer[1]=='P' + && buffer[2]=='N' + && buffer[3]=='G' + && buffer[4]==13 + && buffer[5]==10 + && buffer[6]==26 + && buffer[7]==10 ) #endif - ) - return new MNGFormat; + ) { + return new MNGFormat; + } return 0; } diff --git a/src/gvcore/qxcfi.cpp b/src/gvcore/qxcfi.cpp index a6f2194..afd414f 100644 --- a/src/gvcore/qxcfi.cpp +++ b/src/gvcore/qxcfi.cpp @@ -530,7 +530,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image ) image.fill( tqRgb( 255, 255, 255 ) ); break; } // else, fall through to 32-bit representation - + // fall through case RGBA_GIMAGE: image.create( xcf_image.width, xcf_image.height, 32 ); image.fill( tqRgba( 255, 255, 255, 0 ) ); @@ -546,7 +546,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image ) image.fill( 255 ); break; } // else, fall through to 32-bit representation - + // fall through case GRAYA_GIMAGE: image.create( xcf_image.width, xcf_image.height, 32 ); image.fill( tqRgba( 255, 255, 255, 0 ) ); diff --git a/src/gvcore/slideshow.cpp b/src/gvcore/slideshow.cpp index e8867ad..d6a4799 100644 --- a/src/gvcore/slideshow.cpp +++ b/src/gvcore/slideshow.cpp @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // STL #include <algorithm> +#include <random> // TQt #include <tqtimer.h> @@ -82,7 +83,8 @@ void SlideShow::start(const KURL::List& urls) { mURLs.resize(urls.size()); tqCopy(urls.begin(), urls.end(), mURLs.begin()); if (SlideShowConfig::random()) { - std::random_shuffle(mURLs.begin(), mURLs.end()); + std::random_device rd; + std::shuffle(mURLs.begin(), mURLs.end(), std::mt19937(rd())); } mStartIt=tqFind(mURLs.begin(), mURLs.end(), mDocument->url()); |