generic: compiler warning fixes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-06-13 16:51:17 +03:00
parent ed38160cdd
commit 08bd97aff5
55 changed files with 60 additions and 134 deletions

View file

@ -48,7 +48,7 @@ private:
QCheckBox *systemBell, *customBell, *visibleBell;
QRadioButton *invertScreen, *flashScreen;
QLabel *soundLabel, *colorLabel;
QLabel *soundLabel;
QLineEdit *soundEdit;
QPushButton *soundButton;
KColorButton *colorButton;

View file

@ -78,8 +78,6 @@ private:
QTimer internalTimer;
QString timeServer;
int BufI;
bool refresh;
bool ontimeout;
};

View file

@ -38,7 +38,6 @@ public:
void load();
private:
QTabWidget *tab;
Dtime *dtime;
};

View file

@ -100,8 +100,7 @@ private:
QListWidget *mpUsageList;
QComboBox *mpSizeBox;
QCheckBox *wordWrapCB, *underlineCB, *mpAnimatedCheck;
QTabWidget *m_pTabWidget;
QCheckBox *mpAnimatedCheck;
QWidget *m_pTab1;
};

View file

@ -227,7 +227,7 @@ EFileType check(const QString &file, Family &fam)
foundry;
quint32 style;
int index;
qulonglong ws;
qulonglong ws = 0;
EFileType type=(FcResultMatch!=FcPatternGetBool(pat, FC_SCALABLE, 0, &scalable) || !scalable)
? FILE_BITMAP : FILE_SCALABLE;

View file

@ -174,9 +174,7 @@ CKCmFontInst::CKCmFontInst(QWidget *parent, const QVariantList&)
: KCModule(FontInstallFactory::componentData(), parent),
itsPreview(NULL),
itsConfig(KFI_UI_CFG_FILE),
itsJob(NULL),
itsProgress(NULL),
itsUpdateDialog(NULL),
itsTempDir(NULL),
itsPrintProc(NULL),
itsDownloadFontsAct(NULL)

View file

@ -26,7 +26,12 @@
#include "GroupList.h"
#include "JobRunner.h"
#include <QtCore/QSet>
#include <QSet>
#include <QLabel>
#include <QMenu>
#include <QProcess>
#include <QSplitter>
#include <QComboBox>
#include <KCModule>
#include <KUrl>
#include <KConfig>
@ -38,11 +43,6 @@ class KTempDir;
class KToggleAction;
class KActionMenu;
class KAction;
#include <QLabel>
#include <QMenu>
#include <QProcess>
#include <QSplitter>
#include <QComboBox>
namespace KFI
{
@ -124,14 +124,11 @@ class CKCmFontInst : public KCModule
*itsDeleteFontControl;
CFontFilter *itsFilter;
QString itsLastStatusBarMsg;
KIO::Job *itsJob;
KProgressDialog *itsProgress;
CUpdateDialog *itsUpdateDialog;
KTempDir *itsTempDir;
QProcess *itsPrintProc;
QSet<QString> itsDeletedFonts;
KUrl::List itsModifiedUrls;
CJobRunner *itsRunner;
QMenu *itsPreviewMenu,
*itsPreviewListMenu;
KAction *itsDownloadFontsAct;

View file

@ -49,7 +49,7 @@ class KDE_EXPORT CFcEngine
{
public:
struct Xft;
class Xft;
struct TRange
{

View file

@ -415,8 +415,7 @@ QMap<QString, QString> getFontFileMap(const QSet<QString> &files)
{
QVector<QString> orig(fIt.value().count()),
modified(fIt.value().count());
QSet<QString>::ConstIterator oIt(fIt.value().constBegin()),
oEnd(fIt.value().constEnd());
QSet<QString>::ConstIterator oIt(fIt.value().constBegin());
bool good=true;
int count=fIt.value().count();

View file

@ -92,7 +92,6 @@ class CFontViewPart : public KParts::ReadOnlyPart
// *itsMetaLabel;
KIntNumInput *itsFaceSelector;
QAction *itsChangeTextAction;
int itsFace;
KSharedConfigPtr itsConfig;
BrowserExtension *itsExtension;
QProcess *itsProc;

View file

@ -229,8 +229,6 @@ LaunchConfig::checkChanged()
c = conf.group("BusyCursorSettings");
unsigned int savedCursorTimeout = c.readEntry( "Timeout", 30 );
bool savedBusyBlinking =c.readEntry("Blinking", false);
bool savedBusyBouncing =c.readEntry("Bouncing", true);
c = conf.group("TaskbarButtonSettings");
unsigned int savedTaskbarTimeout = c.readEntry( "Timeout", 30 );

View file

@ -37,7 +37,6 @@ public:
private:
KRandRSystemTray *m_tray;
RandRConfig *m_widget;
RandRDisplay *m_display;
};

View file

@ -47,7 +47,6 @@
KRandRSystemTray::KRandRSystemTray(RandRDisplay *dpy, QWidget* parent)
: KStatusNotifierItem(parent),
m_help(new KHelpMenu(parent, KGlobal::mainComponent().aboutData(), false, actionCollection())),
m_popupUp(false),
m_display(dpy)
{
setIconByName("preferences-desktop-display-randr");

View file

@ -63,7 +63,6 @@ private:
QActionGroup *populateRates(KMenu *menu, const RateList &rates, float rate);
KHelpMenu* m_help;
bool m_popupUp;
QList<KMenu*> m_screenPopups;
KMenu* m_menu;
RandRDisplay *m_display;

View file

@ -37,7 +37,6 @@
LegacyRandRScreen::LegacyRandRScreen(int screenIndex)
: m_config(0L)
, m_screen(screenIndex)
, m_shownDialog(NULL)
{
loadSettings();
setOriginal();

View file

@ -152,8 +152,6 @@ private:
int m_proposedSize;
int m_proposedRefreshRate;
KTimerDialog* m_shownDialog;
};
#endif

View file

@ -87,7 +87,6 @@ signals:
private:
static bool isRelativeTo( QRect rect, QRect to, Relation rel );
int m_changes;
bool m_changed;
bool m_unified;
QPoint m_pos;

View file

@ -75,7 +75,6 @@ protected:
private:
void insufficientVirtualSize();
RandRDisplay *m_display;
bool m_firstLoad;
SettingsContainer *m_container;
QList<CollapsibleWidget*> m_outputList;

View file

@ -154,7 +154,6 @@ protected:
private:
RROutput m_id;
XRROutputInfo* m_info;
QString m_name;
QString m_alias;

View file

@ -21,16 +21,16 @@
#define FILETYPEDETAILS_H
#include <QTabWidget>
class KIconButton;
class MimeTypeData;
class TypesListItem;
#include <QLabel>
#include <QListWidget>
#include <QGroupBox>
#include <QButtonGroup>
#include <QCheckBox>
#include <QRadioButton>
class KIconButton;
class MimeTypeData;
class TypesListItem;
class KLineEdit;
class KPushButton;
class KServiceListWidget;
@ -96,7 +96,6 @@ private:
QGroupBox *m_autoEmbedBox;
QButtonGroup *m_autoEmbedGroup;
KServiceListWidget *embedServiceListWidget;
QRadioButton *m_rbOpenSeparate;
QCheckBox *m_chkAskSave;
QRadioButton *m_rbGroupSettings;
};

View file

@ -31,8 +31,8 @@
#include <stdio.h>
ImportsView::ImportsView(QWidget * parent, KConfig *config) :
QWidget(parent), configFile(config), list(this) {
ImportsView::ImportsView(QWidget * parent) :
QWidget(parent), list(this) {
QBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(KDialog::marginHint());
topLayout->setSpacing(KDialog::spacingHint());

View file

@ -32,7 +32,7 @@
class ImportsView : public QWidget {
Q_OBJECT
public:
explicit ImportsView(QWidget *parent, KConfig *config=0);
explicit ImportsView(QWidget *parent);
virtual ~ImportsView() {
}
void saveSettings() {
@ -40,7 +40,6 @@ public:
void loadSettings() {
}
private:
KConfig *configFile;
QTreeWidget list;
QTimer timer;
private Q_SLOTS:

View file

@ -38,8 +38,8 @@
#include <KGlobal>
#include <KLocale>
StatisticsView::StatisticsView(QWidget *parent, KConfig *config) :
QWidget(parent), configFile(config), dataList(0), connectionsCount(0), filesCount(0), calcCount(0) {
StatisticsView::StatisticsView(QWidget *parent) :
QWidget(parent), dataList(0), connectionsCount(0), filesCount(0), calcCount(0) {
viewStatistics = new QTreeWidget( this );
connectionsL = new QLabel( i18n( "Connections: 0" ), this );
connectionsL->setTextInteractionFlags(Qt::TextSelectableByMouse);

View file

@ -83,7 +83,7 @@ private:
class StatisticsView : public QWidget {
Q_OBJECT
public:
explicit StatisticsView(QWidget *parent=0, KConfig *config=0);
explicit StatisticsView(QWidget *parent=0);
virtual ~StatisticsView() {
}
void saveSettings() {
@ -93,7 +93,6 @@ public:
public Q_SLOTS:
void setListInfo(QTreeWidget *list, int nrOfFiles, int nrOfConnections);
private:
KConfig *configFile;
QTreeWidget* dataList;
QTreeWidget* viewStatistics;
QLabel* connectionsL, *filesL;

View file

@ -34,8 +34,8 @@
#define Before(ttf,in) in.left(in.indexOf(ttf))
#define After(ttf,in) (in.contains(ttf)?QString(in.mid(in.indexOf(ttf)+QString(ttf).length())):QString(""))
NetMon::NetMon(QWidget * parent, KConfig *config) :
QWidget(parent), configFile(config), showmountProc(0), strShare(""), strUser(""), strGroup(""), strMachine(""), strSince(""), strPid(""), iUser(0), iGroup(0), iMachine(0), iPid(0) {
NetMon::NetMon(QWidget * parent) :
QWidget(parent), showmountProc(0), strShare(""), strUser(""), strGroup(""), strMachine(""), strSince(""), strPid(""), iUser(0), iGroup(0), iMachine(0), iPid(0) {
QBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(KDialog::marginHint());
topLayout->setSpacing(KDialog::spacingHint());

View file

@ -31,13 +31,12 @@
class NetMon : public QWidget {
Q_OBJECT
public:
explicit NetMon(QWidget *parent, KConfig * config=0);
explicit NetMon(QWidget *parent);
void saveSettings() {
}
void loadSettings() {
}
private:
KConfig *configFile;
QProcess *showmountProc;
QTreeWidget *list;
QLabel *version;

View file

@ -52,7 +52,7 @@ K_PLUGIN_FACTORY(SambaFactory,
K_EXPORT_PLUGIN(SambaFactory("kcmsamba"))
SambaContainer::SambaContainer(QWidget *parent, const QVariantList&) :
KCModule(SambaFactory::componentData(), parent), config("kcmsambarc"), tabs(this), status(&tabs, &config), imports(&tabs, &config), logView(&tabs, &config), statisticsView(&tabs, &config) {
KCModule(SambaFactory::componentData(), parent), config("kcmsambarc"), tabs(this), status(&tabs), imports(&tabs), logView(&tabs, &config), statisticsView(&tabs) {
QVBoxLayout *layout = new QVBoxLayout( this );
layout->setMargin(0);
layout->setSpacing(0);

View file

@ -22,7 +22,6 @@
#include <QPair>
#include <QHash>
#include <QTimer>
#include <QThread>
#include <QEventLoop>
@ -38,7 +37,6 @@ class CachedDevice : public QObject
private:
qint32 timeout;
QTimer *timer;
LIBMTP_mtpdevice_t* mtpdevice;
LIBMTP_raw_device_t rawdevice;

View file

@ -832,7 +832,7 @@ void MTPSlave::mkdir ( const KUrl& url, int )
LIBMTP_mtpdevice_t *device;
LIBMTP_file_t *file;
LIBMTP_devicestorage_t *storage;
int ret;
int ret = 0;
QPair<void*, LIBMTP_mtpdevice_t*> pair = getPath ( url.directory() );
@ -842,8 +842,7 @@ void MTPSlave::mkdir ( const KUrl& url, int )
device = pair.second;
ret = LIBMTP_Create_Folder ( device, dirName, 0xFFFFFFFF, storage->id );
}
else
if ( pair.first )
else if ( pair.first )
{
file = ( LIBMTP_file_t* ) pair.first;
device = pair.second;

View file

@ -5,7 +5,6 @@
#include <KDebug>
#include <KComponentData>
#include <KRecentDocument>
#include <KDirWatch>
#include <KDesktopFile>
#include <KStandardDirs>
#include <KIO/Job>

View file

@ -19,8 +19,6 @@ protected:
virtual void stat(const KUrl& url);
virtual void mimetype(const KUrl& url);
virtual void del(const KUrl& url, bool isfile);
private:
KDirWatch* m_recentDocWatch;
};
#endif

View file

@ -106,9 +106,6 @@ private: // Private variables
ssh_callbacks mCallbacks;
/** Version of the sftp protocol we are using. */
int sftpVersion;
struct Status
{
int code;

View file

@ -171,7 +171,6 @@ private:
mutable TrashDirMap m_topDirectories; // id -> $topdir of partition
dev_t m_homeDevice;
mutable bool m_trashDirectoriesScanned;
int m_mibEnum;
KConfig m_config;

View file

@ -23,8 +23,7 @@
#include "knotifyplugin.h"
KNotifyPlugin::KNotifyPlugin(QObject *parent, const QVariantList &args)
: QObject(parent),
d(0)
: QObject(parent)
{
Q_UNUSED(args);
}

View file

@ -28,7 +28,6 @@
#include "knotify_export.h"
class KNotifyPluginPrivate;
class KNotifyConfig;
@ -99,9 +98,6 @@ class KNOTIFY_EXPORT KNotifyPlugin : public QObject
*/
void actionInvoked(int id , int action);
private:
KNotifyPluginPrivate *const d;
};
#define K_EXPORT_KNOTIFY_METHOD(libname,classname) \

View file

@ -168,8 +168,8 @@ draw_pool (m_state *state)
}
break;
}
if( state->show_threads )
if( state->modified[index] == 1 )
if( state->show_threads ) {
if( state->modified[index] == 1 ) {
pos_x += 2;
QPainter p(state->w);
p.setPen( Qt::green );
@ -179,6 +179,8 @@ draw_pool (m_state *state)
state->images, pos_x*state->char_width,
pos_y*state->char_height,
state->char_width, state->char_height );
}
}
--state->modified[index];
}
}

View file

@ -67,7 +67,7 @@ KSMShutdownFeedback * KSMShutdownFeedback::s_pSelf = 0L;
KSMShutdownFeedback::KSMShutdownFeedback()
: QWidget( 0L, Qt::Popup ),
m_currentY( 0 ), initialized( false )
initialized( false )
{
setObjectName( "feedbackwidget" );
setAttribute( Qt::WA_NoSystemBackground );

View file

@ -63,7 +63,6 @@ private Q_SLOTS:
private:
static KSMShutdownFeedback * s_pSelf;
KSMShutdownFeedback();
int m_currentY;
QPixmap m_pixmap;
LogoutEffect *effect;
bool initialized;

View file

@ -79,10 +79,10 @@ struct QColorData {
#if 0
typedef QIntDict<QColorData> QColorDict;
typedef QIntDictIterator<QColorData> QColorDictIt;
#endif
static int current_alloc_context = 0; // current color alloc context
static const uint col_std_dict = 419;
static const uint col_large_dict = 18397;
#endif
static int current_alloc_context = 0; // current color alloc context
class QColorScreenData {
public:

View file

@ -707,7 +707,7 @@ namespace Oxygen
void renderHeaderLines( const QRect&, const QPalette&, QPainter*, TileSet::Tiles ) const;
void renderMenuItemRect( const QStyleOption* opt, const QRect& rect, const QPalette& pal, QPainter* p ) const
{ renderMenuItemRect( opt, rect, pal.color(QPalette::Window), p ); }
{ renderMenuItemRect( opt, rect, pal.color(QPalette::Window), pal, p ); }
void renderMenuItemRect( const QStyleOption*, const QRect&, const QColor&, const QPalette&, QPainter* p ) const;

View file

@ -214,7 +214,6 @@ void printCPUClock( const char* cmd )
{
int id;
float clock = 0;
cmd = cmd; /*Silence warning*/
if ( Dirty ) {
processCpuInfo();
@ -237,7 +236,6 @@ void printCPUxClockInfo( const char* cmd )
void printCPUClockInfo( const char* cmd )
{
cmd = cmd; /*Silence warning*/
output( "CPU Clock Frequency\t0\t0\tMHz\n" );
}

View file

@ -11,12 +11,7 @@
#include <X11/Xlib.h>
#include <QtGui/qx11info_x11.h>
const int XFocusOut = FocusOut;
const int XFocusIn = FocusIn;
#undef FocusOut
#undef FocusIn
#undef KeyPress
#undef KeyRelease
#include <fixx11h.h>
int main( int argc, char *argv[] )

View file

@ -114,7 +114,6 @@ private:
static QAction *_exportAction, *_saveAsAction, *_mergeAction, *_importAction;
static KAction *_newEntryAction, *_renameEntryAction, *_deleteEntryAction;
static KAction *_copyPassAction;
QLabel*_details;
QString _currentFolder;
QMap<QString,QString> _currentMap; // save memory by storing
// only the most recent map.
@ -124,8 +123,6 @@ private:
KMenu *_contextMenu;
QTreeWidgetItem *_displayedItem; // used to find old item when selection just changed
KActionCollection *_actionCollection;
KMenu *_controlMenu;
KMenu *_walletSubmenu;
KTreeWidgetSearchLine *_searchLine;
static QAction *_alwaysShowContentsAction, *_alwaysHideContentsAction;
bool _alwaysShowContents;

View file

@ -39,7 +39,6 @@ namespace Oxygen
QList<ClientGroupItemData>(),
_client( *parent ),
_dirty( false ),
draggedItem_( NoItem ),
targetItem_( NoItem )
{

View file

@ -135,9 +135,6 @@ namespace Oxygen
/* used to trigger update at next paintEvent */
bool _dirty;
//! dragged item
int draggedItem_;
//! target item
int targetItem_;

View file

@ -33,6 +33,8 @@
class KDecorationBridge;
class KDecorationFactory;
class KCommonDecorationButton;
class KCommonDecorationWrapper;
enum ButtonType {
HelpButton = 0,
@ -50,12 +52,6 @@ enum ButtonType {
ItemMenuButton // shows the window menu for one tab
};
class KCommonDecorationButton;
class KCommonDecorationButtonPrivate;
class KCommonDecorationPrivate;
class KCommonDecorationWrapper;
/**
* This class eases development of decorations by implementing parts of KDecoration
* which are error prone and common for most decorations.
@ -436,8 +432,6 @@ private:
bool closing; // for menu doubleclick closing...
KCommonDecorationWrapper* wrapper;
KCommonDecorationPrivate *d;
};
/**
@ -519,8 +513,6 @@ private:
Qt::MouseButtons m_lastMouse;
bool m_isLeft;
KCommonDecorationButtonPrivate *d;
};
/** @} */

View file

@ -71,7 +71,6 @@ IconView::IconView(QGraphicsWidget *parent)
m_numTextLines(2),
m_layoutBroken(false),
m_needPostLayoutPass(false),
m_positionsLoaded(false),
m_doubleClick(false),
m_dragInProgress(false),
m_hoverDrag(false),

View file

@ -252,7 +252,6 @@ private:
int m_numTextLines;
bool m_layoutBroken;
bool m_needPostLayoutPass;
bool m_positionsLoaded;
bool m_doubleClick;
bool m_dragInProgress;
bool m_hoverDrag;

View file

@ -95,7 +95,6 @@ private:
QPersistentModelIndex m_pressedIndex;
bool m_dragInProgress;
bool m_wordWrap;
bool m_drawShadows;
};
#endif // LISTVIEW_H

View file

@ -132,7 +132,6 @@ void ItemSpace::checkPreferredPositions()
ItemSpaceItem &item = group.m_groupItems[itemId];
qreal push;
PushPower power;
/*
Push items back towards their perferred positions.

View file

@ -650,7 +650,7 @@ void AppletsContainer::resizeEvent(QGraphicsSceneResizeEvent *event)
void AppletsContainer::syncBorders()
{
qreal left, top, right, bottom = 0;
qreal left, top, right, bottom = 0.0;
if (m_background->isValid()) {
setFlag(QGraphicsItem::ItemHasNoContents, false);

View file

@ -84,7 +84,6 @@ private:
QGraphicsLinearLayout *m_externalLayout;
Qt::Orientation m_orientation;
bool m_expandAll;
Plasma::FrameSvg *m_background;
AppletOverlay *m_appletOverlay;
QTimer *m_updateSizeTimer;
QTimer *m_relayoutTimer;

View file

@ -38,9 +38,7 @@
using namespace Plasma;
SaverDesktop::SaverDesktop(QObject *parent, const QVariantList &args)
: Containment(parent, args),
m_lockDesktopAction(0),
m_appletBrowserAction(0)
: Containment(parent, args)
{
setContainmentType(CustomContainment);
connect(this, SIGNAL(appletAdded(Plasma::Applet*,QPointF)), SLOT(newApplet(Plasma::Applet*,QPointF)));

View file

@ -44,10 +44,6 @@ public:
private slots:
void newApplet(Plasma::Applet *applet, const QPointF &pos);
private:
QAction *m_lockDesktopAction;
QAction *m_appletBrowserAction;
};
#endif

View file

@ -176,7 +176,6 @@ private:
Plasma::DataEngine *m_timeEngine;
QDateTime m_dateFormat;
bool emitWhenSetup;
QStringList m_sourcesToReset;
};