summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gvcore/filedetailview.cpp6
-rw-r--r--src/gvcore/filethumbnailviewitem.cpp4
-rw-r--r--src/gvcore/mngformattype.cpp53
-rw-r--r--src/gvcore/qxcfi.cpp4
-rw-r--r--src/gvcore/slideshow.cpp4
-rw-r--r--src/imageutils/jpegcontent.cpp1
-rw-r--r--src/imageutils/transupp.c6
7 files changed, 41 insertions, 37 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());
diff --git a/src/imageutils/jpegcontent.cpp b/src/imageutils/jpegcontent.cpp
index 0effc16..d94a32e 100644
--- a/src/imageutils/jpegcontent.cpp
+++ b/src/imageutils/jpegcontent.cpp
@@ -195,7 +195,6 @@ struct JPEGContent::Private {
}
bool readSize() {
struct jpeg_decompress_struct srcinfo;
- jpeg_saved_marker_ptr mark;
// Init JPEG structs
JPEGErrorManager errorManager;
diff --git a/src/imageutils/transupp.c b/src/imageutils/transupp.c
index 099fade..0ede0db 100644
--- a/src/imageutils/transupp.c
+++ b/src/imageutils/transupp.c
@@ -2329,6 +2329,7 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo,
jvirt_barray_ptr *src_coef_arrays,
jpeg_transform_info *info)
{
+ (void) srcinfo; /* unused */
/* If force-to-grayscale is requested, adjust destination parameters */
if (info->force_grayscale) {
/* We use jpeg_set_colorspace to make sure subsidiary settings get fixed
@@ -2455,6 +2456,8 @@ jtransform_execute_transformation (j_decompress_ptr srcinfo,
GLOBAL(void)
jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option)
{
+ (void) srcinfo; /* maybe unused */
+ (void) option; /* maybe unused */
#ifdef SAVE_MARKERS_SUPPORTED
int m;
@@ -2481,6 +2484,7 @@ GLOBAL(void)
jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
JCOPY_OPTION option)
{
+ (void) option; /* unused */
jpeg_saved_marker_ptr marker;
/* In the current implementation, we don't actually need to examine the
@@ -2522,4 +2526,4 @@ jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
}
}
-#endif // JPEG_LIB_VERSION >= 80 \ No newline at end of file
+#endif // JPEG_LIB_VERSION >= 80