generic: compiler warnings fixes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-06-06 14:49:42 +03:00
parent 3aef6104f1
commit e3912937d8
52 changed files with 75 additions and 183 deletions

View file

@ -66,8 +66,6 @@ namespace Gwenview
#define LOG(x) ;
#endif
const int MIN_PREV_SIZE = 1000;
const int HEADER_SIZE = 256;
struct LoadingDocumentImplPrivate

View file

@ -62,7 +62,7 @@ FilterMgr::~FilterMgr()
* Loads and initializes the filters.
* @return False if FilterMgr is not ready to filter.
*/
bool FilterMgr::init()
bool FilterMgr::init(KConfig *c, const QString &configGroup)
{
// Load each of the filters and initialize.
KSharedConfig::Ptr pConfig = KSharedConfig::openConfig( QLatin1String( "kttsdrc" ) );

View file

@ -66,7 +66,7 @@ class FilterMgr : public KttsFilterProc
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
virtual bool init();
virtual bool init(KConfig *c, const QString &configGroup);
/**
* Synchronously convert text.

View file

@ -105,7 +105,7 @@ class SpeakerPrivate
config(new KConfig(QLatin1String( "kttsdrc" ))),
q(parent)
{
filterMgr->init();
filterMgr->init(config, QLatin1String( "General" ));
}
~SpeakerPrivate()
@ -306,7 +306,7 @@ void Speaker::init()
kDebug() << "Running: Speaker::init()";
delete d->filterMgr;
d->filterMgr = new FilterMgr();
d->filterMgr->init();
d->filterMgr->init(d->config, QLatin1String( "General" ));
// Reread config setting the top voice if there is one.
d->readTalkerData();

View file

@ -271,7 +271,6 @@ void BinaryClock::paintInterface(QPainter *p, const QStyleOptionGraphicsItem *op
return;
}
QSizeF m_size = contentsRect.size();
int appletHeight = (int) contentsRect.height();
int appletWidth = (int) contentsRect.width();
int dots = m_showSeconds ? 6 : 4;

View file

@ -77,7 +77,6 @@ class BinaryClock : public ClockApplet
QTime m_lastTimeSeen;
QTime m_time;
int m_updateIndex;
Ui::clockConfig ui;
};

View file

@ -126,7 +126,6 @@ private:
bool m_doAutoUpdate;
QTimer* m_autoUpdateTimer;
/// Day Change for PoTD
QTimer *m_dateChangedTimer;
QDate m_currentDay;
QList<QAction *> actions;

View file

@ -35,9 +35,9 @@
Clock::Clock(QObject *parent, const QVariantList &args)
: ClockApplet(parent, args),
m_oldContentSize(QSizeF (0,0)),
m_configUpdated(false),
m_adjustToHeight(1),
m_useCustomFontColor(false),
m_configUpdated(false),
m_fontColor(Qt::white),
m_fontTimeBold(false),
m_fontTimeItalic(false),

View file

@ -224,7 +224,6 @@ private:
MiddleClick m_middleClick;
int m_spacing;
int m_iconScale;
Plasma::LayoutAnimator *m_animator;
QGraphicsLinearLayout *layout;
Ui::appearanceconfig m_appUi;
@ -246,10 +245,7 @@ private:
TaskGroupItem *m_rootGroupItem;
GroupManager *m_groupManager;
TaskManager::GroupManager::TaskGroupingStrategy m_groupingStrategy;
bool m_groupWhenFull;
int m_currentDesktop;
QWeakPointer<QWidget> m_popupDialog;
QAction *m_lockAct;
QAction *m_unlockAct;

View file

@ -123,7 +123,7 @@ Notes::Notes(QObject *parent, const QVariantList &args)
m_textEdit->setMinimumSize(QSize(60, 60)); //Ensure a minimum size (height) for the textEdit
KTextEdit *w = m_textEdit->nativeWidget();
m_noteEditor = new NotesTextEdit(this);
m_noteEditor = new NotesTextEdit();
m_noteEditor->setFrameShape(QFrame::NoFrame);
m_noteEditor->viewport()->setAutoFillBackground(false);
m_noteEditor->setWindowFlags(m_noteEditor->windowFlags() | Qt::BypassGraphicsProxyWidget);

View file

@ -37,9 +37,8 @@
#include <Plasma/Applet>
NotesTextEdit::NotesTextEdit(Plasma::Applet *applet, QWidget *parent)
NotesTextEdit::NotesTextEdit(QWidget *parent)
: KRichTextEdit(parent),
m_applet(applet),
m_formatMenu(0)
{
}

View file

@ -46,7 +46,7 @@ class NotesTextEdit : public KRichTextEdit
Q_OBJECT
public:
NotesTextEdit(Plasma::Applet *applet, QWidget *parent = 0);
NotesTextEdit(QWidget *parent = 0);
~NotesTextEdit();
void setFormatMenu(QMenu *menu);
@ -74,7 +74,6 @@ class NotesTextEdit : public KRichTextEdit
void wheelEvent(QWheelEvent *event);
private:
Plasma::Applet *m_applet;
QMenu *m_formatMenu;
};

View file

@ -34,9 +34,6 @@ protected slots:
void appClicked();
void activeWindowChanged(WId id);
void enableWidgets();
private:
WId m_me;
};
#endif // APPKEY_HEADER

View file

@ -104,7 +104,7 @@ void SendKeys::send(uint k)
if (d->keys.contains(keycode)) {
keycode = d->keys[keycode];
} else if (keycode < Qt::Key_Space && keycode > Qt::Key_ydiaeresis) {
} else if (keycode < Qt::Key_Space || keycode > Qt::Key_ydiaeresis) {
return;
}
keycode = XKeysymToKeycode(dsp, keycode);

View file

@ -250,19 +250,29 @@ QString QalculateLabels::drawStructure(MathStructure& m, const PrintOptions& po,
}
for (size_t i = 0; i < terms.size(); i++) {
if (!po.short_multiplication && i > 0) {
if (do_space[i - 1]) STR_MARKUP_ADD(mstr, " ");
if (do_space[i - 1]) {
STR_MARKUP_ADD(mstr, " ");
}
mstr += mul_str;
if (do_space[i]) STR_MARKUP_ADD(mstr, " ");
if (do_space[i]) {
STR_MARKUP_ADD(mstr, " ");
}
} else if (i > 0) {
switch (nm[i]) {
case MULTIPLICATION_SIGN_SPACE: {
if (do_space[i - 1] && do_space[i]) STR_MARKUP_ADD(mstr, " ");
if (do_space[i - 1] && do_space[i]) {
STR_MARKUP_ADD(mstr, " ");
}
break;
}
case MULTIPLICATION_SIGN_OPERATOR: {
if (do_space[i - 1]) STR_MARKUP_ADD(mstr, " ");
if (do_space[i - 1]) {
STR_MARKUP_ADD(mstr, " ");
}
mstr += mul_str;
if (do_space[i]) STR_MARKUP_ADD(mstr, " ");
if (do_space[i]) {
STR_MARKUP_ADD(mstr, " ");
}
break;
}
case MULTIPLICATION_SIGN_OPERATOR_SHORT: {
@ -294,7 +304,9 @@ QString QalculateLabels::drawStructure(MathStructure& m, const PrintOptions& po,
}
for (size_t i = 0; i < terms.size(); i++) {
if (i > 0) {
if (do_space[i - 1]) STR_MARKUP_ADD(mstr, " ");
if (do_space[i - 1]) {
STR_MARKUP_ADD(mstr, " ");
}
if (m[i].type() == STRUCT_NEGATE) {
if (po.use_unicode_signs && (!po.can_display_unicode_string_function || (*po.can_display_unicode_string_function)(SIGN_MINUS, po.can_display_unicode_string_arg))) {
STR_MARKUP_ADD(mstr, SIGN_MINUS);
@ -304,7 +316,9 @@ QString QalculateLabels::drawStructure(MathStructure& m, const PrintOptions& po,
} else {
STR_MARKUP_ADD(mstr, "+");
}
if (do_space[i]) STR_MARKUP_ADD(mstr, " ");
if (do_space[i]) {
STR_MARKUP_ADD(mstr, " ");
}
}
mstr += terms[i];
}

View file

@ -76,7 +76,6 @@ class UnitConverter : public Plasma::PopupApplet
Plasma::LineEdit *m_pTxtValue1;
Plasma::LineEdit *m_pTxtValue2;
Plasma::Label *m_pInfo;
int m_iCategory;
bool m_bCalculateReverse;
};

View file

@ -323,7 +323,6 @@ void FreeHandle::paint(QPainter *painter, const QStyleOptionGraphicsItem *option
//XXX this code is duplicated in the next function
QPointF basePoint = m_rect.topLeft() + QPointF(HANDLE_MARGIN, iconMargin);
QPointF step = QPointF(0, m_iconSize + iconMargin);
QPointF separator = step + QPointF(0, iconMargin);
//end duplicate code
QPointF shiftC;
@ -408,7 +407,6 @@ Handle::ButtonType FreeHandle::mapToButton(const QPointF &point) const
//XXX this code is duplicated in the prev. function
QPointF basePoint = m_rect.topLeft() + QPointF(HANDLE_MARGIN, iconMargin);
QPointF step = QPointF(0, m_iconSize + iconMargin);
QPointF separator = step + QPointF(0, iconMargin);
//end duplicate code
QRectF activeArea = QRectF(basePoint, QSizeF(m_iconSize, m_iconSize));
@ -630,9 +628,6 @@ void FreeHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
return;
}
//Track how much the mouse has moved.
QPointF deltaScene = event->scenePos() - event->lastScenePos();
if (m_pressedButton == MoveButton) {
if (leaveCurrentView(event->screenPos())) {
Plasma::View *v = Plasma::View::topLevelViewAt(event->screenPos());

View file

@ -62,7 +62,6 @@ class GridHandle : public Handle
bool m_moving;
QPointF m_startPos;
int m_savedZValue;
QPointF m_widgetPos;
QSizeF m_widgetSize;
Plasma::Svg *m_configureIcons;

View file

@ -46,10 +46,6 @@
#include "abstractgroup.h"
#include "groupicon.h"
const int ICON_SIZE = 70;
const int SEARCH_DELAY = 300;
const int SCROLL_STEP_DURATION = 300;
GroupIconList::GroupIconList(Plasma::Location loc, QGraphicsItem *parent)
: QGraphicsWidget(parent),
m_arrowsSvg(new Plasma::Svg(this)),

View file

@ -32,10 +32,8 @@ K_EXPORT_PLASMA_WALLPAPER(virus, Virus)
Virus::Virus(QObject *parent, const QVariantList &args)
: Plasma::Wallpaper(parent, args),
m_configWidget(0),
m_currentSlide(-1),
m_model(0),
m_dialog(0),
m_randomize(true),
m_startupResumed(false)
{
connect(this, SIGNAL(renderCompleted(QImage)), this, SLOT(updateBackground(QImage)));

View file

@ -79,13 +79,11 @@ class Virus : public Plasma::Wallpaper
QPixmap m_pixmap;
QPixmap m_oldPixmap;
QPixmap m_oldFadedPixmap;
int m_currentSlide;
BackgroundListModel *m_model;
KFileDialog *m_dialog;
QSize m_size;
QString m_img;
QDateTime m_previousModified;
bool m_randomize;
bool m_startupResumed;
QTimer m_timer;

View file

@ -17,9 +17,9 @@
BackgroundDelegate::BackgroundDelegate(QObject *listener, float ratio, QObject *parent)
: QAbstractItemDelegate(parent),
m_listener(listener),
m_ratio(ratio)
{
Q_UNUSED(listener);
}
void BackgroundDelegate::paint(QPainter *painter,

View file

@ -34,7 +34,6 @@ public:
private:
static const int MARGIN = 5;
QObject *m_listener;
float m_ratio;
};

View file

@ -123,24 +123,28 @@ QHash<KUrl, QPair<bool, int> > Transfer::availableMirrors(const KUrl &file) cons
void Transfer::setUploadLimit(int ulLimit, SpeedLimit limit)
{
if (limit == Transfer::VisibleSpeedLimit)
if (limit == Transfer::VisibleSpeedLimit) {
m_visibleUploadLimit = ulLimit;
if (ulLimit < m_uploadLimit || m_uploadLimit == 0)
if (ulLimit < m_uploadLimit || m_uploadLimit == 0) {
m_uploadLimit = ulLimit;
else
}
} else {
m_uploadLimit = ulLimit;
}
setSpeedLimits(m_uploadLimit, m_downloadLimit);
}
void Transfer::setDownloadLimit(int dlLimit, SpeedLimit limit)
{
if (limit == Transfer::VisibleSpeedLimit)
if (limit == Transfer::VisibleSpeedLimit) {
m_visibleDownloadLimit = dlLimit;
if (dlLimit < m_downloadLimit || m_downloadLimit == 0)
if (dlLimit < m_downloadLimit || m_downloadLimit == 0) {
m_downloadLimit = dlLimit;
else
}
} else {
m_downloadLimit = dlLimit;
}
setSpeedLimits(m_uploadLimit, m_downloadLimit);
}

View file

@ -24,8 +24,9 @@
#include <KComboBox>
#include <KLineEdit>
struct VerificationDelegatePrivate
class VerificationDelegatePrivate
{
public:
VerificationDelegatePrivate()
{
}

View file

@ -26,8 +26,9 @@
#include <KIcon>
#include <KLocale>
struct VerificationModelPrivate
class VerificationModelPrivate
{
public:
VerificationModelPrivate()
{
}

View file

@ -26,8 +26,9 @@ class Verifier;
#include "verifier.h"
#include "verificationthread.h"
struct VerifierPrivate
class VerifierPrivate
{
public:
VerifierPrivate(Verifier *verifier)
: q(verifier),
model(0)

View file

@ -126,7 +126,6 @@ class DlgChecksumSettingsWidget : public KCModule
private:
Ui::ChecksumSearch ui;
KDialog *m_parent;
QStandardItemModel *m_model;
QSortFilterProxyModel *m_proxy;
QStringList m_modes;

View file

@ -569,9 +569,6 @@ KMixWindow::loadBaseConfig()
{
KConfigGroup config(KGlobal::config(), "Global");
// GlobalConfig& gcfg = GlobalConfig::instance();
GlobalConfigData& gcd = GlobalConfig::instance().data;
QList<QString> preferredMixersInSoundMenu;
preferredMixersInSoundMenu = config.readEntry("Soundmenu.Mixers", preferredMixersInSoundMenu);
GlobalConfig::instance().setMixersForSoundmenu(preferredMixersInSoundMenu.toSet());

View file

@ -97,7 +97,6 @@ private:
void forkExec(const QStringList& args);
void errorPopup(const QString& msg);
KAccel *m_keyAccel;
KAction* _actionShowMenubar;
private:
@ -107,7 +106,6 @@ private:
GlobalConfigData configDataSnapshot;
bool m_startVisible;
bool m_visibilityUpdateAllowed;
bool m_multiDriverMode; // Not officially supported.
bool m_autouseMultimediaKeys; // Due to message freeze, not in config dialog in KDE4.4

View file

@ -68,7 +68,6 @@ KMixD : public KDEDModule, protected QDBusContext
//virtual void applyPrefs( KMixPrefDlg *prefDlg );
private:
//KAccel *m_keyAccel;
//KAction* _actionShowMenubar;
bool m_multiDriverMode; // Not officially supported.

View file

@ -57,12 +57,6 @@ void ControlManager::announce(QString mixerId, ControlChangeType::Type changeTyp
for (it = listeners.begin(); it != listeners.end(); ++it)
{
Listener& listener = *it;
if ( &listener == 0 )
{
kWarning() << "null Listener detected ... skipping";
continue;
}
bool mixerIsOfInterest = listener.getMixerId().isEmpty() || mixerId.isEmpty()
|| listener.getMixerId() == mixerId;

View file

@ -98,7 +98,6 @@ public:
private:
long calculateVolume(Volume::VolumeType vt);
Mixer *_mixer;
QList<std::shared_ptr<MixDevice> > _mds;
static const long VolMax;

View file

@ -76,7 +76,6 @@ class KMixerWidget : public QWidget
Mixer *_mixer;
QVBoxLayout *m_topLayout; // contains TabWidget
QString _guiprofId;
ProfTab* _tab;
std::vector<ViewBase*> _views;
KActionCollection* _actionCollection; // -<- applciations wide action collection

View file

@ -67,7 +67,6 @@ void QtFrameBuffer::getServerFormat(rfbPixelFormat &format)
void QtFrameBuffer::updateFrameBuffer()
{
QImage img = QPixmap::grabWindow(win).toImage();
QSize imgSize = img.size();
// verify what part of the image need to be marked as changed
@ -75,7 +74,7 @@ void QtFrameBuffer::updateFrameBuffer()
// img is the current one
#if 0 // This is actually slower than updating the whole desktop...
QSize imgSize = img.size();
QImage map(imgSize, QImage::Format_Mono);
map.fill(0);

View file

@ -77,8 +77,9 @@ static const char *mask =
" xxx ";
struct RfbServerManagerStatic
class RfbServerManagerStatic
{
public:
RfbServerManager server;
};

View file

@ -430,7 +430,7 @@ void KU_EditUser::selectuser()
if ( first ) {
if ( !shell.isEmpty() ) {
bool tested = false;
for ( int i=0; i<leshell->count(); i++ )
for ( int i=0; i<leshell->count(); i++ ) {
if ( leshell->itemText(i) == shell ) {
tested = true;
leshell->setCurrentIndex(i);
@ -440,6 +440,7 @@ void KU_EditUser::selectuser()
leshell->insertItem( leshell->count(), shell );
leshell->setCurrentIndex( leshell->count()-1 );
}
}
} else
leshell->setCurrentIndex( 0 );
} else {

View file

@ -133,7 +133,6 @@ bool KU_GroupFiles::save()
kDebug() << "KU_GroupFiles::save() ";
FILE *group_fd = NULL;
FILE *gshadow_fd = NULL;
gid_t tmp_gid = 0;
QString tmpGe, tmpSe, tmp2;
QString group_filename, new_group_filename;
QString gshadow_filename, new_gshadow_filename;
@ -213,7 +212,6 @@ bool KU_GroupFiles::save()
tmpGe.replace( QLatin1Char( ':' ), QLatin1String( "_" ) );
group.setName( tmpGe );
tmp_gid = group.getGID();
tmpGe += QLatin1Char( ':' ) +
group.getPwd() + QLatin1Char( ':' ) +
QString::number( group.getGID() ) + QLatin1Char( ':' );

View file

@ -244,7 +244,6 @@ bool KU_UserFiles::savepwd()
{
FILE *passwd_fd = NULL;
FILE *shadow_fd = NULL;
uid_t tmp_uid = 0;
QString s;
QString s1;
QString tmp, tmp2;
@ -321,7 +320,6 @@ bool KU_UserFiles::savepwd()
usersindex++;
}
tmp_uid = user.getUID();
if ( caps & Cap_Shadow )
tmp = QLatin1String( "x" );
else {

View file

@ -47,7 +47,9 @@ class PreferencesDialog : public KConfigDialog
DlgPresentation * m_presentation;
DlgAnnotations * m_annotations;
DlgEditor * m_editor;
#ifdef OKULAR_DEBUG_CONFIGPAGE
DlgDebug * m_debug;
#endif
KPageWidgetItem * m_annotationsPage;
};

View file

@ -654,9 +654,6 @@ void RegularArea<NormalizedShape, Shape>::simplify()
template <class NormalizedShape, class Shape>
bool RegularArea<NormalizedShape, Shape>::isNull() const
{
if ( !this )
return false;
if ( this->isEmpty() )
return false;
@ -671,9 +668,6 @@ bool RegularArea<NormalizedShape, Shape>::isNull() const
template <class NormalizedShape, class Shape>
bool RegularArea<NormalizedShape, Shape>::intersects( const NormalizedShape& rect ) const
{
if ( !this )
return false;
if ( this->isEmpty() )
return false;
@ -688,9 +682,6 @@ bool RegularArea<NormalizedShape, Shape>::intersects( const NormalizedShape& rec
template <class NormalizedShape, class Shape>
bool RegularArea<NormalizedShape, Shape>::intersects( const RegularArea<NormalizedShape,Shape> *area ) const
{
if ( !this )
return false;
if ( this->isEmpty() )
return false;
@ -711,9 +702,6 @@ bool RegularArea<NormalizedShape, Shape>::intersects( const RegularArea<Normaliz
template <class NormalizedShape, class Shape>
void RegularArea<NormalizedShape, Shape>::appendArea( const RegularArea<NormalizedShape, Shape> *area )
{
if ( !this )
return;
typename QList<NormalizedShape>::const_iterator areaIt = area->begin(), areaItEnd = area->end();
for ( ; areaIt != areaItEnd; ++areaIt )
this->append( *areaIt );
@ -723,9 +711,6 @@ void RegularArea<NormalizedShape, Shape>::appendArea( const RegularArea<Normaliz
template <class NormalizedShape, class Shape>
void RegularArea<NormalizedShape, Shape>::appendShape( const NormalizedShape& shape, MergeSide side )
{
if ( !this )
return;
int size = this->count();
// if the list is empty, adds the shape normally
if ( size == 0 )
@ -798,9 +783,6 @@ void RegularArea<NormalizedShape, Shape>::appendShape( const NormalizedShape& sh
template <class NormalizedShape, class Shape>
bool RegularArea<NormalizedShape, Shape>::contains( double x, double y ) const
{
if ( !this )
return false;
if ( this->isEmpty() )
return false;
@ -815,9 +797,6 @@ bool RegularArea<NormalizedShape, Shape>::contains( double x, double y ) const
template <class NormalizedShape, class Shape>
bool RegularArea<NormalizedShape, Shape>::contains( const NormalizedShape& shape ) const
{
if ( !this )
return false;
if ( this->isEmpty() )
return false;
@ -827,7 +806,7 @@ bool RegularArea<NormalizedShape, Shape>::contains( const NormalizedShape& shape
template <class NormalizedShape, class Shape>
QList<Shape> RegularArea<NormalizedShape, Shape>::geometry( int xScale, int yScale, int dx, int dy ) const
{
if ( !this || this->isEmpty() )
if ( this->isEmpty() )
return QList<Shape>();
QList<Shape> ret;
@ -846,9 +825,6 @@ QList<Shape> RegularArea<NormalizedShape, Shape>::geometry( int xScale, int ySca
template <class NormalizedShape, class Shape>
void RegularArea<NormalizedShape, Shape>::transform( const QTransform &matrix )
{
if ( !this )
return;
if ( this->isEmpty() )
return;

View file

@ -407,6 +407,7 @@ bool BookmarkManager::addBookmark( const KUrl& referurl, const Okular::DocumentV
KBookmarkGroup thebg;
QHash<KUrl, QString>::iterator it = d->bookmarkFind( referurl, true, &thebg );
Q_ASSERT( it != d->knownFiles.end() );
Q_UNUSED( it );
int count = 0; // Number of bookmarks in the current page
bool found = false;
@ -506,6 +507,7 @@ QString BookmarkManager::titleForUrl( const KUrl& referurl ) const
KBookmarkGroup thebg;
QHash<KUrl, QString>::iterator it = d->bookmarkFind( referurl, false, &thebg );
Q_ASSERT( it != d->knownFiles.end() );
Q_UNUSED( it );
return thebg.fullText();
}
@ -634,6 +636,7 @@ bool BookmarkManager::setPageBookmark( int page )
KBookmarkGroup thebg;
QHash<KUrl, QString>::iterator it = d->bookmarkFind( d->url, true, &thebg );
Q_ASSERT( it != d->knownFiles.end() );
Q_UNUSED( it );
bool found = false;
bool added = false;

View file

@ -149,7 +149,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
}
// This is the address of the glyph that will be returned.
struct glyph *g = glyphtable+ch;
glyph *g = glyphtable+ch;
if (fatalErrorInFontLoading == true)

View file

@ -322,7 +322,7 @@ glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCol
#define SUB(a, b) ((quint32 *) (((char *) a) - b))
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
// This table is used for changing the bit order in a byte. The
// expression bitflp[byte] takes a byte in big endian and gives the
// little endian equivalent of that.
@ -344,6 +344,7 @@ static const uchar bitflip[256] = {
7, 135, 71, 199, 39, 167, 103, 231, 23, 151, 87, 215, 55, 183, 119, 247,
15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255
};
#endif // Q_BYTE_ORDER
static quint32 bit_masks[33] = {
0x0, 0x1, 0x3, 0x7,

View file

@ -340,7 +340,7 @@ void dvifile::renumber()
for(int i=1; i<=total_pages; i++) {
quint8 *ptr = dviData.data() + page_offset[i-1]+1;
quint8 *num = (quint8 *)&i;
for(quint8 j=0; j<4; j++)
for(quint8 j=0; j<4; j++) {
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
*(ptr++) = num[0];
*(ptr++) = num[1];
@ -352,6 +352,7 @@ void dvifile::renumber()
*(ptr++) = num[1];
*(ptr++) = num[0];
#endif
}
}
}

View file

@ -28,6 +28,5 @@ public:
private:
QFileInfo m_fileInfo;
quint32 m_line;
bool m_exists;
};
#endif

View file

@ -19,7 +19,7 @@ static const char FAXMAGIC[] = "\000PC Research, Inc\000\000\000\000\000\000";
#define FAX_DPI_FINE QPoint(203,196)
/* rearrange input bits into t16bits lsb-first chunks */
static void normalize( struct pagenode *pn, int revbits, int swapbytes, size_t length )
static void normalize( pagenode *pn, int revbits, int swapbytes, size_t length )
{
t32bits *p = (t32bits *) pn->data;
@ -205,7 +205,7 @@ static void draw_line( pixnum *run, int lineNum, pagenode *pn )
}
}
static bool get_image( struct pagenode *pn )
static bool get_image( pagenode *pn )
{
unsigned char *data = getstrip( pn, 0 );
if ( !data )
@ -229,7 +229,7 @@ class FaxDocument::Private
}
FaxDocument *mParent;
struct pagenode mPageNode;
pagenode mPageNode;
FaxDocument::DocumentType mType;
};

View file

@ -343,7 +343,7 @@ unexpected(const char *what, int LineNum)
/* Expand tiff modified huffman data (g3-1d without EOLs) */
void
MHexpand(struct pagenode *pn, drawfunc df)
MHexpand(pagenode *pn, drawfunc df)
{
int a0; /* reference element */
int lastx; /* copy line width to register */
@ -396,7 +396,7 @@ MHexpand(struct pagenode *pn, drawfunc df)
/* Expand group-3 1-dimensional data */
void
g31expand(struct pagenode *pn, drawfunc df)
g31expand(pagenode *pn, drawfunc df)
{
int a0; /* reference element */
int lastx; /* copy line width to register */
@ -480,7 +480,7 @@ g31expand(struct pagenode *pn, drawfunc df)
/* Expand group-3 2-dimensional data */
void
g32expand(struct pagenode *pn, drawfunc df)
g32expand(pagenode *pn, drawfunc df)
{
int RunLength; /* Length of current run */
int a0; /* reference element */
@ -600,7 +600,7 @@ g32expand(struct pagenode *pn, drawfunc df)
/* Expand group-4 data */
void
g4expand(struct pagenode *pn, drawfunc df)
g4expand(pagenode *pn, drawfunc df)
{
int RunLength; /* Length of current run */
int a0; /* reference element */
@ -717,7 +717,7 @@ static const unsigned char zerotab[256] = {
/* count fax lines */
int
G3count(struct pagenode *pn, int twoD)
G3count(pagenode *pn, int twoD)
{
t16bits *p = pn->data;
t16bits *end = p + pn->length/sizeof(*p);

View file

@ -91,13 +91,13 @@ void MDDocument::slotKIOData(KIO::Job *kiojob, const QByteArray &data)
void MDDocument::slotKIOResult(KJob *kiojob)
{
KIO::TransferJob *transferjob = static_cast<KIO::TransferJob*>(kiojob);
if (kiojob->error() != 0) {
KIO::TransferJob *transferjob = qobject_cast<KIO::TransferJob*>(kiojob);
if (transferjob->error() != 0) {
kWarning() << "Could not fetch resource";
} else {
kDebug() << "Resource fetched";
}
kiojob->deleteLater();
transferjob->deleteLater();
}
#include "moc_document_md.cpp"

View file

@ -118,32 +118,6 @@ static QRectF stringToRectF( const QString &data )
return QRectF( origin, size );
}
static bool parseGUID( const QString &guidString, unsigned short guid[16]) {
if (guidString.length() <= 35) {
return false;
}
// Maps bytes to positions in guidString
const static int indexes[] = {6, 4, 2, 0, 11, 9, 16, 14, 19, 21, 24, 26, 28, 30, 32, 34};
for (int i = 0; i < 16; i++) {
int hex1 = hex2int(guidString[indexes[i]].cell());
int hex2 = hex2int(guidString[indexes[i]+1].cell());
if ((hex1 < 0) || (hex2 < 0))
{
return false;
}
guid[i] = hex1 * 16 + hex2;
}
return true;
}
// Read next token of abbreviated path data
static bool nextAbbPathToken(AbbPathToken *token)
{
@ -592,24 +566,6 @@ static const KZipFileEntry* loadFile( KZip *archive, const QString &fileName, Qt
return entry->isFile() ? static_cast< const KZipFileEntry * >( entry ) : 0;
}
/**
\return The name of a resource from the \p fileName
*/
static QString resourceName( const QString &fileName )
{
QString resource = fileName;
const int slashPos = fileName.lastIndexOf( QLatin1Char( '/' ) );
const int dotPos = fileName.lastIndexOf( QLatin1Char( '.' ) );
if ( slashPos > -1 ) {
if ( dotPos > -1 && dotPos > slashPos ) {
resource = fileName.mid( slashPos + 1, dotPos - slashPos - 1 );
} else {
resource = fileName.mid( slashPos + 1 );
}
}
return resource;
}
static QColor interpolatedColor( const QColor &c1, const QColor &c2 )
{
QColor res;

View file

@ -32,25 +32,6 @@
#include "core/movie.h"
#include "snapshottaker.h"
static QAction* createToolBarButtonWithWidgetPopup( QToolBar* toolBar, QWidget *widget, const QIcon &icon )
{
QToolButton *button = new QToolButton( toolBar );
QAction *action = toolBar->addWidget( button );
button->setAutoRaise( true );
button->setIcon( icon );
button->setPopupMode( QToolButton::InstantPopup );
QMenu *menu = new QMenu( button );
button->setMenu( menu );
QWidgetAction *widgetAction = new QWidgetAction( menu );
QWidget *dummy = new QWidget( menu );
widgetAction->setDefaultWidget( dummy );
QVBoxLayout *dummyLayout = new QVBoxLayout( dummy );
dummyLayout->setMargin( 5 );
dummyLayout->addWidget( widget );
menu->addAction( widgetAction );
return action;
}
/* Private storage. */
class VideoWidget::Private
{

View file

@ -165,7 +165,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition
else if (partition.roles().has(PartitionRole::Primary))
pedType = PED_PARTITION_NORMAL;
if (pedType == static_cast<int>(0xffffffff))
if (pedType == static_cast<PedPartitionType>(0xffffffff))
{
report.line() << i18nc("@info/plain", "Unknown partition role for new partition <filename>%1</filename> (roles: %2)", partition.deviceNode(), partition.roles().toString());
return "";