Compare commits

...

2 Commits

Author SHA1 Message Date
Alexander Golubev ad0516738d fix an incorrect condition in ImageViewController::eventFilter()
7 months ago
Alexander Golubev 49382cff55 Suppress several warnings
7 months ago

@ -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,13 @@ 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 /*, textW, textH */;
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(); // textW=textRect(false).width();
textH=textRect(false).height(); // textH=textRect(false).height();
// Draw pixmap // Draw pixmap
TQRect pRect = pixmapRect(false); TQRect pRect = pixmapRect(false);

@ -418,7 +418,7 @@ void ImageViewController::updateFromSettings() {
*/ */
bool ImageViewController::eventFilter(TQObject* object, TQEvent* event) { bool ImageViewController::eventFilter(TQObject* object, TQEvent* event) {
if (!d->mFullScreen) return false; if (!d->mFullScreen) return false;
if (!event->type()==TQEvent::MouseMove) return false; if (event->type()!=TQEvent::MouseMove) return false;
// Check we must filter this object. This is an application filter, so we // Check we must filter this object. This is an application filter, so we
// have to check we are not dealing with another object. // have to check we are not dealing with another object.
@ -434,16 +434,10 @@ bool ImageViewController::eventFilter(TQObject* object, TQEvent* event) {
d->updateFullScreenBarPosition(); d->updateFullScreenBarPosition();
if (event->type()==TQEvent::MouseMove) {
d->mCursorHidden=false; d->mCursorHidden=false;
d->restartAutoHideTimer(); d->restartAutoHideTimer();
}
if (d->mCursorHidden) {
TQApplication::setOverrideCursor(blankCursor,true);
} else {
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
}
return false; return false;
} }

@ -293,7 +293,8 @@ 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 (( // MNG signature
buffer[0]==138
&& buffer[1]=='M' && buffer[1]=='M'
&& buffer[2]=='N' && buffer[2]=='N'
&& buffer[3]=='G' && buffer[3]=='G'
@ -301,7 +302,8 @@ TQImageFormat* MNGFormatType::decoderFor( const uchar* buffer, int length )
&& buffer[5]==10 && buffer[5]==10
&& buffer[6]==26 && buffer[6]==26
&& buffer[7]==10 && buffer[7]==10
|| buffer[0]==139 // JNG signature ) || ( // JNG signature
buffer[0]==139
&& buffer[1]=='J' && buffer[1]=='J'
&& buffer[2]=='N' && buffer[2]=='N'
&& buffer[3]=='G' && buffer[3]=='G'
@ -310,7 +312,8 @@ TQImageFormat* MNGFormatType::decoderFor( const uchar* buffer, int length )
&& 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 ) || ( // PNG signature
buffer[0]==137
&& buffer[1]=='P' && buffer[1]=='P'
&& buffer[2]=='N' && buffer[2]=='N'
&& buffer[3]=='G' && buffer[3]=='G'
@ -320,7 +323,9 @@ TQImageFormat* MNGFormatType::decoderFor( const uchar* buffer, int length )
&& 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

Loading…
Cancel
Save