Suppress several warnings

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 430301a436)
pull/34/head
Alexander Golubev 9 months ago committed by Michele Calgaro
parent e00293c122
commit f9cd02afd1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -306,13 +306,13 @@ void FileDetailView::slotSortingChanged( int col )
switch( col ) { switch( col ) {
case COL_NAME: case COL_NAME:
sortSpec = (sort & ~TQDir::SortByMask | TQDir::Name); sortSpec = ((sort & ~TQDir::SortByMask) | TQDir::Name);
break; break;
case COL_SIZE: case COL_SIZE:
sortSpec = (sort & ~TQDir::SortByMask | TQDir::Size); sortSpec = ((sort & ~TQDir::SortByMask) | TQDir::Size);
break; break;
case COL_DATE: case COL_DATE:
sortSpec = (sort & ~TQDir::SortByMask | TQDir::Time); sortSpec = ((sort & ~TQDir::SortByMask) | TQDir::Time);
break; break;
// the following columns have no equivalent in TQDir, so we set it // the following columns have no equivalent in TQDir, so we set it

@ -319,13 +319,11 @@ void FileThumbnailViewItem::paintItem(TQPainter *p, const TQColorGroup &cg) {
bool isRight=view->itemTextPos()==TQIconView::Right; bool isRight=view->itemTextPos()==TQIconView::Right;
bool isShownItem=view->shownFileItem() && view->shownFileItem()->extraData(view)==this; bool isShownItem=view->shownFileItem() && view->shownFileItem()->extraData(view)==this;
bool isImage=!Archive::fileItemIsDirOrArchive(mFileItem); bool isImage=!Archive::fileItemIsDirOrArchive(mFileItem);
int textX, textY, textW, textH; int textX, textY;
int thumbnailSize=FileViewConfig::thumbnailSize(); int thumbnailSize=FileViewConfig::thumbnailSize();
textX=textRect(false).x(); textX=textRect(false).x();
textY=textRect(false).y(); textY=textRect(false).y();
textW=textRect(false).width();
textH=textRect(false).height();
// Draw pixmap // Draw pixmap
TQRect pRect = pixmapRect(false); TQRect pRect = pixmapRect(false);

@ -293,34 +293,35 @@ TQImageFormat* MNGFormatType::decoderFor( const uchar* buffer, int length )
{ {
if (length < 8) return 0; if (length < 8) return 0;
if (buffer[0]==138 // MNG signature if ( ( buffer[0]==138 // MNG signature
&& buffer[1]=='M' && buffer[1]=='M'
&& buffer[2]=='N' && buffer[2]=='N'
&& buffer[3]=='G' && buffer[3]=='G'
&& buffer[4]==13 && buffer[4]==13
&& buffer[5]==10 && buffer[5]==10
&& buffer[6]==26 && buffer[6]==26
&& buffer[7]==10 && buffer[7]==10 )
|| buffer[0]==139 // JNG signature || ( buffer[0]==139 // JNG signature
&& buffer[1]=='J' && buffer[1]=='J'
&& buffer[2]=='N' && buffer[2]=='N'
&& buffer[3]=='G' && buffer[3]=='G'
&& buffer[4]==13 && buffer[4]==13
&& buffer[5]==10 && buffer[5]==10
&& buffer[6]==26 && buffer[6]==26
&& buffer[7]==10 && buffer[7]==10 )
#ifdef TQT_NO_IMAGEIO_PNG // if we don't have native PNG support use libmng #ifdef TQT_NO_IMAGEIO_PNG // if we don't have native PNG support use libmng
|| buffer[0]==137 // PNG signature || ( buffer[0]==137 // PNG signature
&& buffer[1]=='P' && buffer[1]=='P'
&& buffer[2]=='N' && buffer[2]=='N'
&& buffer[3]=='G' && buffer[3]=='G'
&& buffer[4]==13 && buffer[4]==13
&& buffer[5]==10 && buffer[5]==10
&& buffer[6]==26 && buffer[6]==26
&& buffer[7]==10 && buffer[7]==10 )
#endif #endif
) ) {
return new MNGFormat; return new MNGFormat;
}
return 0; return 0;
} }

@ -530,7 +530,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
image.fill( tqRgb( 255, 255, 255 ) ); image.fill( tqRgb( 255, 255, 255 ) );
break; break;
} // else, fall through to 32-bit representation } // else, fall through to 32-bit representation
// fall through
case RGBA_GIMAGE: case RGBA_GIMAGE:
image.create( xcf_image.width, xcf_image.height, 32 ); image.create( xcf_image.width, xcf_image.height, 32 );
image.fill( tqRgba( 255, 255, 255, 0 ) ); image.fill( tqRgba( 255, 255, 255, 0 ) );
@ -546,7 +546,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
image.fill( 255 ); image.fill( 255 );
break; break;
} // else, fall through to 32-bit representation } // else, fall through to 32-bit representation
// fall through
case GRAYA_GIMAGE: case GRAYA_GIMAGE:
image.create( xcf_image.width, xcf_image.height, 32 ); image.create( xcf_image.width, xcf_image.height, 32 );
image.fill( tqRgba( 255, 255, 255, 0 ) ); image.fill( tqRgba( 255, 255, 255, 0 ) );

@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// STL // STL
#include <algorithm> #include <algorithm>
#include <random>
// TQt // TQt
#include <tqtimer.h> #include <tqtimer.h>
@ -82,7 +83,8 @@ void SlideShow::start(const KURL::List& urls) {
mURLs.resize(urls.size()); mURLs.resize(urls.size());
tqCopy(urls.begin(), urls.end(), mURLs.begin()); tqCopy(urls.begin(), urls.end(), mURLs.begin());
if (SlideShowConfig::random()) { 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()); mStartIt=tqFind(mURLs.begin(), mURLs.end(), mDocument->url());

@ -195,7 +195,6 @@ struct JPEGContent::Private {
} }
bool readSize() { bool readSize() {
struct jpeg_decompress_struct srcinfo; struct jpeg_decompress_struct srcinfo;
jpeg_saved_marker_ptr mark;
// Init JPEG structs // Init JPEG structs
JPEGErrorManager errorManager; JPEGErrorManager errorManager;

@ -2329,6 +2329,7 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo,
jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *src_coef_arrays,
jpeg_transform_info *info) jpeg_transform_info *info)
{ {
(void) srcinfo; /* unused */
/* If force-to-grayscale is requested, adjust destination parameters */ /* If force-to-grayscale is requested, adjust destination parameters */
if (info->force_grayscale) { if (info->force_grayscale) {
/* We use jpeg_set_colorspace to make sure subsidiary settings get fixed /* 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) GLOBAL(void)
jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option) jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option)
{ {
(void) srcinfo; /* maybe unused */
(void) option; /* maybe unused */
#ifdef SAVE_MARKERS_SUPPORTED #ifdef SAVE_MARKERS_SUPPORTED
int m; int m;
@ -2481,6 +2484,7 @@ GLOBAL(void)
jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
JCOPY_OPTION option) JCOPY_OPTION option)
{ {
(void) option; /* unused */
jpeg_saved_marker_ptr marker; jpeg_saved_marker_ptr marker;
/* In the current implementation, we don't actually need to examine the /* 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 #endif // JPEG_LIB_VERSION >= 80

Loading…
Cancel
Save