mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 02:42:52 +00:00
generic: compiler warnings fixes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3aef6104f1
commit
e3912937d8
52 changed files with 75 additions and 183 deletions
|
@ -66,8 +66,6 @@ namespace Gwenview
|
||||||
#define LOG(x) ;
|
#define LOG(x) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int MIN_PREV_SIZE = 1000;
|
|
||||||
|
|
||||||
const int HEADER_SIZE = 256;
|
const int HEADER_SIZE = 256;
|
||||||
|
|
||||||
struct LoadingDocumentImplPrivate
|
struct LoadingDocumentImplPrivate
|
||||||
|
|
|
@ -62,7 +62,7 @@ FilterMgr::~FilterMgr()
|
||||||
* Loads and initializes the filters.
|
* Loads and initializes the filters.
|
||||||
* @return False if FilterMgr is not ready to filter.
|
* @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.
|
// Load each of the filters and initialize.
|
||||||
KSharedConfig::Ptr pConfig = KSharedConfig::openConfig( QLatin1String( "kttsdrc" ) );
|
KSharedConfig::Ptr pConfig = KSharedConfig::openConfig( QLatin1String( "kttsdrc" ) );
|
||||||
|
|
|
@ -66,7 +66,7 @@ class FilterMgr : public KttsFilterProc
|
||||||
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
|
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
|
||||||
* separate configuration files of their own.
|
* separate configuration files of their own.
|
||||||
*/
|
*/
|
||||||
virtual bool init();
|
virtual bool init(KConfig *c, const QString &configGroup);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Synchronously convert text.
|
* Synchronously convert text.
|
||||||
|
|
|
@ -105,7 +105,7 @@ class SpeakerPrivate
|
||||||
config(new KConfig(QLatin1String( "kttsdrc" ))),
|
config(new KConfig(QLatin1String( "kttsdrc" ))),
|
||||||
q(parent)
|
q(parent)
|
||||||
{
|
{
|
||||||
filterMgr->init();
|
filterMgr->init(config, QLatin1String( "General" ));
|
||||||
}
|
}
|
||||||
|
|
||||||
~SpeakerPrivate()
|
~SpeakerPrivate()
|
||||||
|
@ -306,7 +306,7 @@ void Speaker::init()
|
||||||
kDebug() << "Running: Speaker::init()";
|
kDebug() << "Running: Speaker::init()";
|
||||||
delete d->filterMgr;
|
delete d->filterMgr;
|
||||||
d->filterMgr = new 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.
|
// Reread config setting the top voice if there is one.
|
||||||
d->readTalkerData();
|
d->readTalkerData();
|
||||||
|
|
|
@ -271,7 +271,6 @@ void BinaryClock::paintInterface(QPainter *p, const QStyleOptionGraphicsItem *op
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QSizeF m_size = contentsRect.size();
|
|
||||||
int appletHeight = (int) contentsRect.height();
|
int appletHeight = (int) contentsRect.height();
|
||||||
int appletWidth = (int) contentsRect.width();
|
int appletWidth = (int) contentsRect.width();
|
||||||
int dots = m_showSeconds ? 6 : 4;
|
int dots = m_showSeconds ? 6 : 4;
|
||||||
|
|
|
@ -77,7 +77,6 @@ class BinaryClock : public ClockApplet
|
||||||
|
|
||||||
QTime m_lastTimeSeen;
|
QTime m_lastTimeSeen;
|
||||||
QTime m_time;
|
QTime m_time;
|
||||||
int m_updateIndex;
|
|
||||||
|
|
||||||
Ui::clockConfig ui;
|
Ui::clockConfig ui;
|
||||||
};
|
};
|
||||||
|
|
|
@ -126,7 +126,6 @@ private:
|
||||||
bool m_doAutoUpdate;
|
bool m_doAutoUpdate;
|
||||||
QTimer* m_autoUpdateTimer;
|
QTimer* m_autoUpdateTimer;
|
||||||
/// Day Change for PoTD
|
/// Day Change for PoTD
|
||||||
QTimer *m_dateChangedTimer;
|
|
||||||
QDate m_currentDay;
|
QDate m_currentDay;
|
||||||
QList<QAction *> actions;
|
QList<QAction *> actions;
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
Clock::Clock(QObject *parent, const QVariantList &args)
|
Clock::Clock(QObject *parent, const QVariantList &args)
|
||||||
: ClockApplet(parent, args),
|
: ClockApplet(parent, args),
|
||||||
m_oldContentSize(QSizeF (0,0)),
|
m_oldContentSize(QSizeF (0,0)),
|
||||||
|
m_configUpdated(false),
|
||||||
m_adjustToHeight(1),
|
m_adjustToHeight(1),
|
||||||
m_useCustomFontColor(false),
|
m_useCustomFontColor(false),
|
||||||
m_configUpdated(false),
|
|
||||||
m_fontColor(Qt::white),
|
m_fontColor(Qt::white),
|
||||||
m_fontTimeBold(false),
|
m_fontTimeBold(false),
|
||||||
m_fontTimeItalic(false),
|
m_fontTimeItalic(false),
|
||||||
|
|
|
@ -224,7 +224,6 @@ private:
|
||||||
MiddleClick m_middleClick;
|
MiddleClick m_middleClick;
|
||||||
int m_spacing;
|
int m_spacing;
|
||||||
int m_iconScale;
|
int m_iconScale;
|
||||||
Plasma::LayoutAnimator *m_animator;
|
|
||||||
QGraphicsLinearLayout *layout;
|
QGraphicsLinearLayout *layout;
|
||||||
|
|
||||||
Ui::appearanceconfig m_appUi;
|
Ui::appearanceconfig m_appUi;
|
||||||
|
@ -246,10 +245,7 @@ private:
|
||||||
|
|
||||||
TaskGroupItem *m_rootGroupItem;
|
TaskGroupItem *m_rootGroupItem;
|
||||||
GroupManager *m_groupManager;
|
GroupManager *m_groupManager;
|
||||||
TaskManager::GroupManager::TaskGroupingStrategy m_groupingStrategy;
|
|
||||||
bool m_groupWhenFull;
|
|
||||||
|
|
||||||
int m_currentDesktop;
|
|
||||||
QWeakPointer<QWidget> m_popupDialog;
|
QWeakPointer<QWidget> m_popupDialog;
|
||||||
QAction *m_lockAct;
|
QAction *m_lockAct;
|
||||||
QAction *m_unlockAct;
|
QAction *m_unlockAct;
|
||||||
|
|
|
@ -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
|
m_textEdit->setMinimumSize(QSize(60, 60)); //Ensure a minimum size (height) for the textEdit
|
||||||
|
|
||||||
KTextEdit *w = m_textEdit->nativeWidget();
|
KTextEdit *w = m_textEdit->nativeWidget();
|
||||||
m_noteEditor = new NotesTextEdit(this);
|
m_noteEditor = new NotesTextEdit();
|
||||||
m_noteEditor->setFrameShape(QFrame::NoFrame);
|
m_noteEditor->setFrameShape(QFrame::NoFrame);
|
||||||
m_noteEditor->viewport()->setAutoFillBackground(false);
|
m_noteEditor->viewport()->setAutoFillBackground(false);
|
||||||
m_noteEditor->setWindowFlags(m_noteEditor->windowFlags() | Qt::BypassGraphicsProxyWidget);
|
m_noteEditor->setWindowFlags(m_noteEditor->windowFlags() | Qt::BypassGraphicsProxyWidget);
|
||||||
|
|
|
@ -37,9 +37,8 @@
|
||||||
|
|
||||||
#include <Plasma/Applet>
|
#include <Plasma/Applet>
|
||||||
|
|
||||||
NotesTextEdit::NotesTextEdit(Plasma::Applet *applet, QWidget *parent)
|
NotesTextEdit::NotesTextEdit(QWidget *parent)
|
||||||
: KRichTextEdit(parent),
|
: KRichTextEdit(parent),
|
||||||
m_applet(applet),
|
|
||||||
m_formatMenu(0)
|
m_formatMenu(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ class NotesTextEdit : public KRichTextEdit
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NotesTextEdit(Plasma::Applet *applet, QWidget *parent = 0);
|
NotesTextEdit(QWidget *parent = 0);
|
||||||
~NotesTextEdit();
|
~NotesTextEdit();
|
||||||
|
|
||||||
void setFormatMenu(QMenu *menu);
|
void setFormatMenu(QMenu *menu);
|
||||||
|
@ -74,7 +74,6 @@ class NotesTextEdit : public KRichTextEdit
|
||||||
void wheelEvent(QWheelEvent *event);
|
void wheelEvent(QWheelEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Plasma::Applet *m_applet;
|
|
||||||
QMenu *m_formatMenu;
|
QMenu *m_formatMenu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,6 @@ protected slots:
|
||||||
void appClicked();
|
void appClicked();
|
||||||
void activeWindowChanged(WId id);
|
void activeWindowChanged(WId id);
|
||||||
void enableWidgets();
|
void enableWidgets();
|
||||||
|
|
||||||
private:
|
|
||||||
WId m_me;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // APPKEY_HEADER
|
#endif // APPKEY_HEADER
|
||||||
|
|
|
@ -104,7 +104,7 @@ void SendKeys::send(uint k)
|
||||||
|
|
||||||
if (d->keys.contains(keycode)) {
|
if (d->keys.contains(keycode)) {
|
||||||
keycode = d->keys[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;
|
return;
|
||||||
}
|
}
|
||||||
keycode = XKeysymToKeycode(dsp, keycode);
|
keycode = XKeysymToKeycode(dsp, keycode);
|
||||||
|
|
|
@ -250,19 +250,29 @@ QString QalculateLabels::drawStructure(MathStructure& m, const PrintOptions& po,
|
||||||
}
|
}
|
||||||
for (size_t i = 0; i < terms.size(); i++) {
|
for (size_t i = 0; i < terms.size(); i++) {
|
||||||
if (!po.short_multiplication && i > 0) {
|
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;
|
mstr += mul_str;
|
||||||
if (do_space[i]) STR_MARKUP_ADD(mstr, " ");
|
if (do_space[i]) {
|
||||||
|
STR_MARKUP_ADD(mstr, " ");
|
||||||
|
}
|
||||||
} else if (i > 0) {
|
} else if (i > 0) {
|
||||||
switch (nm[i]) {
|
switch (nm[i]) {
|
||||||
case MULTIPLICATION_SIGN_SPACE: {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case MULTIPLICATION_SIGN_OPERATOR: {
|
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;
|
mstr += mul_str;
|
||||||
if (do_space[i]) STR_MARKUP_ADD(mstr, " ");
|
if (do_space[i]) {
|
||||||
|
STR_MARKUP_ADD(mstr, " ");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MULTIPLICATION_SIGN_OPERATOR_SHORT: {
|
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++) {
|
for (size_t i = 0; i < terms.size(); i++) {
|
||||||
if (i > 0) {
|
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 (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))) {
|
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);
|
STR_MARKUP_ADD(mstr, SIGN_MINUS);
|
||||||
|
@ -304,7 +316,9 @@ QString QalculateLabels::drawStructure(MathStructure& m, const PrintOptions& po,
|
||||||
} else {
|
} else {
|
||||||
STR_MARKUP_ADD(mstr, "+");
|
STR_MARKUP_ADD(mstr, "+");
|
||||||
}
|
}
|
||||||
if (do_space[i]) STR_MARKUP_ADD(mstr, " ");
|
if (do_space[i]) {
|
||||||
|
STR_MARKUP_ADD(mstr, " ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mstr += terms[i];
|
mstr += terms[i];
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,6 @@ class UnitConverter : public Plasma::PopupApplet
|
||||||
Plasma::LineEdit *m_pTxtValue1;
|
Plasma::LineEdit *m_pTxtValue1;
|
||||||
Plasma::LineEdit *m_pTxtValue2;
|
Plasma::LineEdit *m_pTxtValue2;
|
||||||
Plasma::Label *m_pInfo;
|
Plasma::Label *m_pInfo;
|
||||||
int m_iCategory;
|
|
||||||
bool m_bCalculateReverse;
|
bool m_bCalculateReverse;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -323,7 +323,6 @@ void FreeHandle::paint(QPainter *painter, const QStyleOptionGraphicsItem *option
|
||||||
//XXX this code is duplicated in the next function
|
//XXX this code is duplicated in the next function
|
||||||
QPointF basePoint = m_rect.topLeft() + QPointF(HANDLE_MARGIN, iconMargin);
|
QPointF basePoint = m_rect.topLeft() + QPointF(HANDLE_MARGIN, iconMargin);
|
||||||
QPointF step = QPointF(0, m_iconSize + iconMargin);
|
QPointF step = QPointF(0, m_iconSize + iconMargin);
|
||||||
QPointF separator = step + QPointF(0, iconMargin);
|
|
||||||
//end duplicate code
|
//end duplicate code
|
||||||
|
|
||||||
QPointF shiftC;
|
QPointF shiftC;
|
||||||
|
@ -408,7 +407,6 @@ Handle::ButtonType FreeHandle::mapToButton(const QPointF &point) const
|
||||||
//XXX this code is duplicated in the prev. function
|
//XXX this code is duplicated in the prev. function
|
||||||
QPointF basePoint = m_rect.topLeft() + QPointF(HANDLE_MARGIN, iconMargin);
|
QPointF basePoint = m_rect.topLeft() + QPointF(HANDLE_MARGIN, iconMargin);
|
||||||
QPointF step = QPointF(0, m_iconSize + iconMargin);
|
QPointF step = QPointF(0, m_iconSize + iconMargin);
|
||||||
QPointF separator = step + QPointF(0, iconMargin);
|
|
||||||
//end duplicate code
|
//end duplicate code
|
||||||
|
|
||||||
QRectF activeArea = QRectF(basePoint, QSizeF(m_iconSize, m_iconSize));
|
QRectF activeArea = QRectF(basePoint, QSizeF(m_iconSize, m_iconSize));
|
||||||
|
@ -630,9 +628,6 @@ void FreeHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Track how much the mouse has moved.
|
|
||||||
QPointF deltaScene = event->scenePos() - event->lastScenePos();
|
|
||||||
|
|
||||||
if (m_pressedButton == MoveButton) {
|
if (m_pressedButton == MoveButton) {
|
||||||
if (leaveCurrentView(event->screenPos())) {
|
if (leaveCurrentView(event->screenPos())) {
|
||||||
Plasma::View *v = Plasma::View::topLevelViewAt(event->screenPos());
|
Plasma::View *v = Plasma::View::topLevelViewAt(event->screenPos());
|
||||||
|
|
|
@ -62,7 +62,6 @@ class GridHandle : public Handle
|
||||||
|
|
||||||
bool m_moving;
|
bool m_moving;
|
||||||
QPointF m_startPos;
|
QPointF m_startPos;
|
||||||
int m_savedZValue;
|
|
||||||
QPointF m_widgetPos;
|
QPointF m_widgetPos;
|
||||||
QSizeF m_widgetSize;
|
QSizeF m_widgetSize;
|
||||||
Plasma::Svg *m_configureIcons;
|
Plasma::Svg *m_configureIcons;
|
||||||
|
|
|
@ -46,10 +46,6 @@
|
||||||
#include "abstractgroup.h"
|
#include "abstractgroup.h"
|
||||||
#include "groupicon.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)
|
GroupIconList::GroupIconList(Plasma::Location loc, QGraphicsItem *parent)
|
||||||
: QGraphicsWidget(parent),
|
: QGraphicsWidget(parent),
|
||||||
m_arrowsSvg(new Plasma::Svg(this)),
|
m_arrowsSvg(new Plasma::Svg(this)),
|
||||||
|
|
|
@ -32,10 +32,8 @@ K_EXPORT_PLASMA_WALLPAPER(virus, Virus)
|
||||||
Virus::Virus(QObject *parent, const QVariantList &args)
|
Virus::Virus(QObject *parent, const QVariantList &args)
|
||||||
: Plasma::Wallpaper(parent, args),
|
: Plasma::Wallpaper(parent, args),
|
||||||
m_configWidget(0),
|
m_configWidget(0),
|
||||||
m_currentSlide(-1),
|
|
||||||
m_model(0),
|
m_model(0),
|
||||||
m_dialog(0),
|
m_dialog(0),
|
||||||
m_randomize(true),
|
|
||||||
m_startupResumed(false)
|
m_startupResumed(false)
|
||||||
{
|
{
|
||||||
connect(this, SIGNAL(renderCompleted(QImage)), this, SLOT(updateBackground(QImage)));
|
connect(this, SIGNAL(renderCompleted(QImage)), this, SLOT(updateBackground(QImage)));
|
||||||
|
|
|
@ -79,13 +79,11 @@ class Virus : public Plasma::Wallpaper
|
||||||
QPixmap m_pixmap;
|
QPixmap m_pixmap;
|
||||||
QPixmap m_oldPixmap;
|
QPixmap m_oldPixmap;
|
||||||
QPixmap m_oldFadedPixmap;
|
QPixmap m_oldFadedPixmap;
|
||||||
int m_currentSlide;
|
|
||||||
BackgroundListModel *m_model;
|
BackgroundListModel *m_model;
|
||||||
KFileDialog *m_dialog;
|
KFileDialog *m_dialog;
|
||||||
QSize m_size;
|
QSize m_size;
|
||||||
QString m_img;
|
QString m_img;
|
||||||
QDateTime m_previousModified;
|
QDateTime m_previousModified;
|
||||||
bool m_randomize;
|
|
||||||
bool m_startupResumed;
|
bool m_startupResumed;
|
||||||
|
|
||||||
QTimer m_timer;
|
QTimer m_timer;
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
|
|
||||||
BackgroundDelegate::BackgroundDelegate(QObject *listener, float ratio, QObject *parent)
|
BackgroundDelegate::BackgroundDelegate(QObject *listener, float ratio, QObject *parent)
|
||||||
: QAbstractItemDelegate(parent),
|
: QAbstractItemDelegate(parent),
|
||||||
m_listener(listener),
|
|
||||||
m_ratio(ratio)
|
m_ratio(ratio)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BackgroundDelegate::paint(QPainter *painter,
|
void BackgroundDelegate::paint(QPainter *painter,
|
||||||
|
|
|
@ -34,7 +34,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int MARGIN = 5;
|
static const int MARGIN = 5;
|
||||||
QObject *m_listener;
|
|
||||||
float m_ratio;
|
float m_ratio;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -123,24 +123,28 @@ QHash<KUrl, QPair<bool, int> > Transfer::availableMirrors(const KUrl &file) cons
|
||||||
|
|
||||||
void Transfer::setUploadLimit(int ulLimit, SpeedLimit limit)
|
void Transfer::setUploadLimit(int ulLimit, SpeedLimit limit)
|
||||||
{
|
{
|
||||||
if (limit == Transfer::VisibleSpeedLimit)
|
if (limit == Transfer::VisibleSpeedLimit) {
|
||||||
m_visibleUploadLimit = ulLimit;
|
m_visibleUploadLimit = ulLimit;
|
||||||
if (ulLimit < m_uploadLimit || m_uploadLimit == 0)
|
if (ulLimit < m_uploadLimit || m_uploadLimit == 0) {
|
||||||
m_uploadLimit = ulLimit;
|
m_uploadLimit = ulLimit;
|
||||||
else
|
}
|
||||||
|
} else {
|
||||||
m_uploadLimit = ulLimit;
|
m_uploadLimit = ulLimit;
|
||||||
|
}
|
||||||
|
|
||||||
setSpeedLimits(m_uploadLimit, m_downloadLimit);
|
setSpeedLimits(m_uploadLimit, m_downloadLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Transfer::setDownloadLimit(int dlLimit, SpeedLimit limit)
|
void Transfer::setDownloadLimit(int dlLimit, SpeedLimit limit)
|
||||||
{
|
{
|
||||||
if (limit == Transfer::VisibleSpeedLimit)
|
if (limit == Transfer::VisibleSpeedLimit) {
|
||||||
m_visibleDownloadLimit = dlLimit;
|
m_visibleDownloadLimit = dlLimit;
|
||||||
if (dlLimit < m_downloadLimit || m_downloadLimit == 0)
|
if (dlLimit < m_downloadLimit || m_downloadLimit == 0) {
|
||||||
m_downloadLimit = dlLimit;
|
m_downloadLimit = dlLimit;
|
||||||
else
|
}
|
||||||
|
} else {
|
||||||
m_downloadLimit = dlLimit;
|
m_downloadLimit = dlLimit;
|
||||||
|
}
|
||||||
|
|
||||||
setSpeedLimits(m_uploadLimit, m_downloadLimit);
|
setSpeedLimits(m_uploadLimit, m_downloadLimit);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,9 @@
|
||||||
#include <KComboBox>
|
#include <KComboBox>
|
||||||
#include <KLineEdit>
|
#include <KLineEdit>
|
||||||
|
|
||||||
struct VerificationDelegatePrivate
|
class VerificationDelegatePrivate
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
VerificationDelegatePrivate()
|
VerificationDelegatePrivate()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,9 @@
|
||||||
#include <KIcon>
|
#include <KIcon>
|
||||||
#include <KLocale>
|
#include <KLocale>
|
||||||
|
|
||||||
struct VerificationModelPrivate
|
class VerificationModelPrivate
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
VerificationModelPrivate()
|
VerificationModelPrivate()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,9 @@ class Verifier;
|
||||||
#include "verifier.h"
|
#include "verifier.h"
|
||||||
#include "verificationthread.h"
|
#include "verificationthread.h"
|
||||||
|
|
||||||
struct VerifierPrivate
|
class VerifierPrivate
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
VerifierPrivate(Verifier *verifier)
|
VerifierPrivate(Verifier *verifier)
|
||||||
: q(verifier),
|
: q(verifier),
|
||||||
model(0)
|
model(0)
|
||||||
|
|
|
@ -126,7 +126,6 @@ class DlgChecksumSettingsWidget : public KCModule
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::ChecksumSearch ui;
|
Ui::ChecksumSearch ui;
|
||||||
KDialog *m_parent;
|
|
||||||
QStandardItemModel *m_model;
|
QStandardItemModel *m_model;
|
||||||
QSortFilterProxyModel *m_proxy;
|
QSortFilterProxyModel *m_proxy;
|
||||||
QStringList m_modes;
|
QStringList m_modes;
|
||||||
|
|
|
@ -569,9 +569,6 @@ KMixWindow::loadBaseConfig()
|
||||||
{
|
{
|
||||||
KConfigGroup config(KGlobal::config(), "Global");
|
KConfigGroup config(KGlobal::config(), "Global");
|
||||||
|
|
||||||
// GlobalConfig& gcfg = GlobalConfig::instance();
|
|
||||||
GlobalConfigData& gcd = GlobalConfig::instance().data;
|
|
||||||
|
|
||||||
QList<QString> preferredMixersInSoundMenu;
|
QList<QString> preferredMixersInSoundMenu;
|
||||||
preferredMixersInSoundMenu = config.readEntry("Soundmenu.Mixers", preferredMixersInSoundMenu);
|
preferredMixersInSoundMenu = config.readEntry("Soundmenu.Mixers", preferredMixersInSoundMenu);
|
||||||
GlobalConfig::instance().setMixersForSoundmenu(preferredMixersInSoundMenu.toSet());
|
GlobalConfig::instance().setMixersForSoundmenu(preferredMixersInSoundMenu.toSet());
|
||||||
|
|
|
@ -97,7 +97,6 @@ private:
|
||||||
void forkExec(const QStringList& args);
|
void forkExec(const QStringList& args);
|
||||||
void errorPopup(const QString& msg);
|
void errorPopup(const QString& msg);
|
||||||
|
|
||||||
KAccel *m_keyAccel;
|
|
||||||
KAction* _actionShowMenubar;
|
KAction* _actionShowMenubar;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -107,7 +106,6 @@ private:
|
||||||
GlobalConfigData configDataSnapshot;
|
GlobalConfigData configDataSnapshot;
|
||||||
|
|
||||||
bool m_startVisible;
|
bool m_startVisible;
|
||||||
bool m_visibilityUpdateAllowed;
|
|
||||||
bool m_multiDriverMode; // Not officially supported.
|
bool m_multiDriverMode; // Not officially supported.
|
||||||
bool m_autouseMultimediaKeys; // Due to message freeze, not in config dialog in KDE4.4
|
bool m_autouseMultimediaKeys; // Due to message freeze, not in config dialog in KDE4.4
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,6 @@ KMixD : public KDEDModule, protected QDBusContext
|
||||||
//virtual void applyPrefs( KMixPrefDlg *prefDlg );
|
//virtual void applyPrefs( KMixPrefDlg *prefDlg );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//KAccel *m_keyAccel;
|
|
||||||
//KAction* _actionShowMenubar;
|
//KAction* _actionShowMenubar;
|
||||||
|
|
||||||
bool m_multiDriverMode; // Not officially supported.
|
bool m_multiDriverMode; // Not officially supported.
|
||||||
|
|
|
@ -57,12 +57,6 @@ void ControlManager::announce(QString mixerId, ControlChangeType::Type changeTyp
|
||||||
for (it = listeners.begin(); it != listeners.end(); ++it)
|
for (it = listeners.begin(); it != listeners.end(); ++it)
|
||||||
{
|
{
|
||||||
Listener& listener = *it;
|
Listener& listener = *it;
|
||||||
if ( &listener == 0 )
|
|
||||||
{
|
|
||||||
kWarning() << "null Listener detected ... skipping";
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool mixerIsOfInterest = listener.getMixerId().isEmpty() || mixerId.isEmpty()
|
bool mixerIsOfInterest = listener.getMixerId().isEmpty() || mixerId.isEmpty()
|
||||||
|| listener.getMixerId() == mixerId;
|
|| listener.getMixerId() == mixerId;
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,6 @@ public:
|
||||||
private:
|
private:
|
||||||
long calculateVolume(Volume::VolumeType vt);
|
long calculateVolume(Volume::VolumeType vt);
|
||||||
|
|
||||||
Mixer *_mixer;
|
|
||||||
QList<std::shared_ptr<MixDevice> > _mds;
|
QList<std::shared_ptr<MixDevice> > _mds;
|
||||||
|
|
||||||
static const long VolMax;
|
static const long VolMax;
|
||||||
|
|
|
@ -76,7 +76,6 @@ class KMixerWidget : public QWidget
|
||||||
Mixer *_mixer;
|
Mixer *_mixer;
|
||||||
QVBoxLayout *m_topLayout; // contains TabWidget
|
QVBoxLayout *m_topLayout; // contains TabWidget
|
||||||
QString _guiprofId;
|
QString _guiprofId;
|
||||||
ProfTab* _tab;
|
|
||||||
std::vector<ViewBase*> _views;
|
std::vector<ViewBase*> _views;
|
||||||
KActionCollection* _actionCollection; // -<- applciations wide action collection
|
KActionCollection* _actionCollection; // -<- applciations wide action collection
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,6 @@ void QtFrameBuffer::getServerFormat(rfbPixelFormat &format)
|
||||||
void QtFrameBuffer::updateFrameBuffer()
|
void QtFrameBuffer::updateFrameBuffer()
|
||||||
{
|
{
|
||||||
QImage img = QPixmap::grabWindow(win).toImage();
|
QImage img = QPixmap::grabWindow(win).toImage();
|
||||||
QSize imgSize = img.size();
|
|
||||||
|
|
||||||
|
|
||||||
// verify what part of the image need to be marked as changed
|
// verify what part of the image need to be marked as changed
|
||||||
|
@ -75,7 +74,7 @@ void QtFrameBuffer::updateFrameBuffer()
|
||||||
// img is the current one
|
// img is the current one
|
||||||
|
|
||||||
#if 0 // This is actually slower than updating the whole desktop...
|
#if 0 // This is actually slower than updating the whole desktop...
|
||||||
|
QSize imgSize = img.size();
|
||||||
QImage map(imgSize, QImage::Format_Mono);
|
QImage map(imgSize, QImage::Format_Mono);
|
||||||
map.fill(0);
|
map.fill(0);
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,9 @@ static const char *mask =
|
||||||
" xxx ";
|
" xxx ";
|
||||||
|
|
||||||
|
|
||||||
struct RfbServerManagerStatic
|
class RfbServerManagerStatic
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
RfbServerManager server;
|
RfbServerManager server;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -430,7 +430,7 @@ void KU_EditUser::selectuser()
|
||||||
if ( first ) {
|
if ( first ) {
|
||||||
if ( !shell.isEmpty() ) {
|
if ( !shell.isEmpty() ) {
|
||||||
bool tested = false;
|
bool tested = false;
|
||||||
for ( int i=0; i<leshell->count(); i++ )
|
for ( int i=0; i<leshell->count(); i++ ) {
|
||||||
if ( leshell->itemText(i) == shell ) {
|
if ( leshell->itemText(i) == shell ) {
|
||||||
tested = true;
|
tested = true;
|
||||||
leshell->setCurrentIndex(i);
|
leshell->setCurrentIndex(i);
|
||||||
|
@ -440,6 +440,7 @@ void KU_EditUser::selectuser()
|
||||||
leshell->insertItem( leshell->count(), shell );
|
leshell->insertItem( leshell->count(), shell );
|
||||||
leshell->setCurrentIndex( leshell->count()-1 );
|
leshell->setCurrentIndex( leshell->count()-1 );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
leshell->setCurrentIndex( 0 );
|
leshell->setCurrentIndex( 0 );
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -133,7 +133,6 @@ bool KU_GroupFiles::save()
|
||||||
kDebug() << "KU_GroupFiles::save() ";
|
kDebug() << "KU_GroupFiles::save() ";
|
||||||
FILE *group_fd = NULL;
|
FILE *group_fd = NULL;
|
||||||
FILE *gshadow_fd = NULL;
|
FILE *gshadow_fd = NULL;
|
||||||
gid_t tmp_gid = 0;
|
|
||||||
QString tmpGe, tmpSe, tmp2;
|
QString tmpGe, tmpSe, tmp2;
|
||||||
QString group_filename, new_group_filename;
|
QString group_filename, new_group_filename;
|
||||||
QString gshadow_filename, new_gshadow_filename;
|
QString gshadow_filename, new_gshadow_filename;
|
||||||
|
@ -213,7 +212,6 @@ bool KU_GroupFiles::save()
|
||||||
tmpGe.replace( QLatin1Char( ':' ), QLatin1String( "_" ) );
|
tmpGe.replace( QLatin1Char( ':' ), QLatin1String( "_" ) );
|
||||||
group.setName( tmpGe );
|
group.setName( tmpGe );
|
||||||
|
|
||||||
tmp_gid = group.getGID();
|
|
||||||
tmpGe += QLatin1Char( ':' ) +
|
tmpGe += QLatin1Char( ':' ) +
|
||||||
group.getPwd() + QLatin1Char( ':' ) +
|
group.getPwd() + QLatin1Char( ':' ) +
|
||||||
QString::number( group.getGID() ) + QLatin1Char( ':' );
|
QString::number( group.getGID() ) + QLatin1Char( ':' );
|
||||||
|
|
|
@ -244,7 +244,6 @@ bool KU_UserFiles::savepwd()
|
||||||
{
|
{
|
||||||
FILE *passwd_fd = NULL;
|
FILE *passwd_fd = NULL;
|
||||||
FILE *shadow_fd = NULL;
|
FILE *shadow_fd = NULL;
|
||||||
uid_t tmp_uid = 0;
|
|
||||||
QString s;
|
QString s;
|
||||||
QString s1;
|
QString s1;
|
||||||
QString tmp, tmp2;
|
QString tmp, tmp2;
|
||||||
|
@ -321,7 +320,6 @@ bool KU_UserFiles::savepwd()
|
||||||
usersindex++;
|
usersindex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp_uid = user.getUID();
|
|
||||||
if ( caps & Cap_Shadow )
|
if ( caps & Cap_Shadow )
|
||||||
tmp = QLatin1String( "x" );
|
tmp = QLatin1String( "x" );
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -47,7 +47,9 @@ class PreferencesDialog : public KConfigDialog
|
||||||
DlgPresentation * m_presentation;
|
DlgPresentation * m_presentation;
|
||||||
DlgAnnotations * m_annotations;
|
DlgAnnotations * m_annotations;
|
||||||
DlgEditor * m_editor;
|
DlgEditor * m_editor;
|
||||||
|
#ifdef OKULAR_DEBUG_CONFIGPAGE
|
||||||
DlgDebug * m_debug;
|
DlgDebug * m_debug;
|
||||||
|
#endif
|
||||||
|
|
||||||
KPageWidgetItem * m_annotationsPage;
|
KPageWidgetItem * m_annotationsPage;
|
||||||
};
|
};
|
||||||
|
|
|
@ -654,9 +654,6 @@ void RegularArea<NormalizedShape, Shape>::simplify()
|
||||||
template <class NormalizedShape, class Shape>
|
template <class NormalizedShape, class Shape>
|
||||||
bool RegularArea<NormalizedShape, Shape>::isNull() const
|
bool RegularArea<NormalizedShape, Shape>::isNull() const
|
||||||
{
|
{
|
||||||
if ( !this )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ( this->isEmpty() )
|
if ( this->isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -671,9 +668,6 @@ bool RegularArea<NormalizedShape, Shape>::isNull() const
|
||||||
template <class NormalizedShape, class Shape>
|
template <class NormalizedShape, class Shape>
|
||||||
bool RegularArea<NormalizedShape, Shape>::intersects( const NormalizedShape& rect ) const
|
bool RegularArea<NormalizedShape, Shape>::intersects( const NormalizedShape& rect ) const
|
||||||
{
|
{
|
||||||
if ( !this )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ( this->isEmpty() )
|
if ( this->isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -688,9 +682,6 @@ bool RegularArea<NormalizedShape, Shape>::intersects( const NormalizedShape& rec
|
||||||
template <class NormalizedShape, class Shape>
|
template <class NormalizedShape, class Shape>
|
||||||
bool RegularArea<NormalizedShape, Shape>::intersects( const RegularArea<NormalizedShape,Shape> *area ) const
|
bool RegularArea<NormalizedShape, Shape>::intersects( const RegularArea<NormalizedShape,Shape> *area ) const
|
||||||
{
|
{
|
||||||
if ( !this )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ( this->isEmpty() )
|
if ( this->isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -711,9 +702,6 @@ bool RegularArea<NormalizedShape, Shape>::intersects( const RegularArea<Normaliz
|
||||||
template <class NormalizedShape, class Shape>
|
template <class NormalizedShape, class Shape>
|
||||||
void RegularArea<NormalizedShape, Shape>::appendArea( const RegularArea<NormalizedShape, Shape> *area )
|
void RegularArea<NormalizedShape, Shape>::appendArea( const RegularArea<NormalizedShape, Shape> *area )
|
||||||
{
|
{
|
||||||
if ( !this )
|
|
||||||
return;
|
|
||||||
|
|
||||||
typename QList<NormalizedShape>::const_iterator areaIt = area->begin(), areaItEnd = area->end();
|
typename QList<NormalizedShape>::const_iterator areaIt = area->begin(), areaItEnd = area->end();
|
||||||
for ( ; areaIt != areaItEnd; ++areaIt )
|
for ( ; areaIt != areaItEnd; ++areaIt )
|
||||||
this->append( *areaIt );
|
this->append( *areaIt );
|
||||||
|
@ -723,9 +711,6 @@ void RegularArea<NormalizedShape, Shape>::appendArea( const RegularArea<Normaliz
|
||||||
template <class NormalizedShape, class Shape>
|
template <class NormalizedShape, class Shape>
|
||||||
void RegularArea<NormalizedShape, Shape>::appendShape( const NormalizedShape& shape, MergeSide side )
|
void RegularArea<NormalizedShape, Shape>::appendShape( const NormalizedShape& shape, MergeSide side )
|
||||||
{
|
{
|
||||||
if ( !this )
|
|
||||||
return;
|
|
||||||
|
|
||||||
int size = this->count();
|
int size = this->count();
|
||||||
// if the list is empty, adds the shape normally
|
// if the list is empty, adds the shape normally
|
||||||
if ( size == 0 )
|
if ( size == 0 )
|
||||||
|
@ -798,9 +783,6 @@ void RegularArea<NormalizedShape, Shape>::appendShape( const NormalizedShape& sh
|
||||||
template <class NormalizedShape, class Shape>
|
template <class NormalizedShape, class Shape>
|
||||||
bool RegularArea<NormalizedShape, Shape>::contains( double x, double y ) const
|
bool RegularArea<NormalizedShape, Shape>::contains( double x, double y ) const
|
||||||
{
|
{
|
||||||
if ( !this )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ( this->isEmpty() )
|
if ( this->isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -815,9 +797,6 @@ bool RegularArea<NormalizedShape, Shape>::contains( double x, double y ) const
|
||||||
template <class NormalizedShape, class Shape>
|
template <class NormalizedShape, class Shape>
|
||||||
bool RegularArea<NormalizedShape, Shape>::contains( const NormalizedShape& shape ) const
|
bool RegularArea<NormalizedShape, Shape>::contains( const NormalizedShape& shape ) const
|
||||||
{
|
{
|
||||||
if ( !this )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ( this->isEmpty() )
|
if ( this->isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -827,7 +806,7 @@ bool RegularArea<NormalizedShape, Shape>::contains( const NormalizedShape& shape
|
||||||
template <class NormalizedShape, class Shape>
|
template <class NormalizedShape, class Shape>
|
||||||
QList<Shape> RegularArea<NormalizedShape, Shape>::geometry( int xScale, int yScale, int dx, int dy ) const
|
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>();
|
return QList<Shape>();
|
||||||
|
|
||||||
QList<Shape> ret;
|
QList<Shape> ret;
|
||||||
|
@ -846,9 +825,6 @@ QList<Shape> RegularArea<NormalizedShape, Shape>::geometry( int xScale, int ySca
|
||||||
template <class NormalizedShape, class Shape>
|
template <class NormalizedShape, class Shape>
|
||||||
void RegularArea<NormalizedShape, Shape>::transform( const QTransform &matrix )
|
void RegularArea<NormalizedShape, Shape>::transform( const QTransform &matrix )
|
||||||
{
|
{
|
||||||
if ( !this )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( this->isEmpty() )
|
if ( this->isEmpty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -407,6 +407,7 @@ bool BookmarkManager::addBookmark( const KUrl& referurl, const Okular::DocumentV
|
||||||
KBookmarkGroup thebg;
|
KBookmarkGroup thebg;
|
||||||
QHash<KUrl, QString>::iterator it = d->bookmarkFind( referurl, true, &thebg );
|
QHash<KUrl, QString>::iterator it = d->bookmarkFind( referurl, true, &thebg );
|
||||||
Q_ASSERT( it != d->knownFiles.end() );
|
Q_ASSERT( it != d->knownFiles.end() );
|
||||||
|
Q_UNUSED( it );
|
||||||
|
|
||||||
int count = 0; // Number of bookmarks in the current page
|
int count = 0; // Number of bookmarks in the current page
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
@ -506,6 +507,7 @@ QString BookmarkManager::titleForUrl( const KUrl& referurl ) const
|
||||||
KBookmarkGroup thebg;
|
KBookmarkGroup thebg;
|
||||||
QHash<KUrl, QString>::iterator it = d->bookmarkFind( referurl, false, &thebg );
|
QHash<KUrl, QString>::iterator it = d->bookmarkFind( referurl, false, &thebg );
|
||||||
Q_ASSERT( it != d->knownFiles.end() );
|
Q_ASSERT( it != d->knownFiles.end() );
|
||||||
|
Q_UNUSED( it );
|
||||||
|
|
||||||
return thebg.fullText();
|
return thebg.fullText();
|
||||||
}
|
}
|
||||||
|
@ -634,6 +636,7 @@ bool BookmarkManager::setPageBookmark( int page )
|
||||||
KBookmarkGroup thebg;
|
KBookmarkGroup thebg;
|
||||||
QHash<KUrl, QString>::iterator it = d->bookmarkFind( d->url, true, &thebg );
|
QHash<KUrl, QString>::iterator it = d->bookmarkFind( d->url, true, &thebg );
|
||||||
Q_ASSERT( it != d->knownFiles.end() );
|
Q_ASSERT( it != d->knownFiles.end() );
|
||||||
|
Q_UNUSED( it );
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
bool added = false;
|
bool added = false;
|
||||||
|
|
|
@ -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.
|
// This is the address of the glyph that will be returned.
|
||||||
struct glyph *g = glyphtable+ch;
|
glyph *g = glyphtable+ch;
|
||||||
|
|
||||||
|
|
||||||
if (fatalErrorInFontLoading == true)
|
if (fatalErrorInFontLoading == true)
|
||||||
|
|
|
@ -322,7 +322,7 @@ glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCol
|
||||||
#define SUB(a, b) ((quint32 *) (((char *) a) - b))
|
#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
|
// 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
|
// expression bitflp[byte] takes a byte in big endian and gives the
|
||||||
// little endian equivalent of that.
|
// 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,
|
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
|
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] = {
|
static quint32 bit_masks[33] = {
|
||||||
0x0, 0x1, 0x3, 0x7,
|
0x0, 0x1, 0x3, 0x7,
|
||||||
|
|
|
@ -340,7 +340,7 @@ void dvifile::renumber()
|
||||||
for(int i=1; i<=total_pages; i++) {
|
for(int i=1; i<=total_pages; i++) {
|
||||||
quint8 *ptr = dviData.data() + page_offset[i-1]+1;
|
quint8 *ptr = dviData.data() + page_offset[i-1]+1;
|
||||||
quint8 *num = (quint8 *)&i;
|
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
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
*(ptr++) = num[0];
|
*(ptr++) = num[0];
|
||||||
*(ptr++) = num[1];
|
*(ptr++) = num[1];
|
||||||
|
@ -354,6 +354,7 @@ void dvifile::renumber()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QString dvifile::convertPDFtoPS(const QString &PDFFilename, QString *converrorms)
|
QString dvifile::convertPDFtoPS(const QString &PDFFilename, QString *converrorms)
|
||||||
|
|
|
@ -28,6 +28,5 @@ public:
|
||||||
private:
|
private:
|
||||||
QFileInfo m_fileInfo;
|
QFileInfo m_fileInfo;
|
||||||
quint32 m_line;
|
quint32 m_line;
|
||||||
bool m_exists;
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,7 +19,7 @@ static const char FAXMAGIC[] = "\000PC Research, Inc\000\000\000\000\000\000";
|
||||||
#define FAX_DPI_FINE QPoint(203,196)
|
#define FAX_DPI_FINE QPoint(203,196)
|
||||||
|
|
||||||
/* rearrange input bits into t16bits lsb-first chunks */
|
/* 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;
|
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 );
|
unsigned char *data = getstrip( pn, 0 );
|
||||||
if ( !data )
|
if ( !data )
|
||||||
|
@ -229,7 +229,7 @@ class FaxDocument::Private
|
||||||
}
|
}
|
||||||
|
|
||||||
FaxDocument *mParent;
|
FaxDocument *mParent;
|
||||||
struct pagenode mPageNode;
|
pagenode mPageNode;
|
||||||
FaxDocument::DocumentType mType;
|
FaxDocument::DocumentType mType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -343,7 +343,7 @@ unexpected(const char *what, int LineNum)
|
||||||
|
|
||||||
/* Expand tiff modified huffman data (g3-1d without EOLs) */
|
/* Expand tiff modified huffman data (g3-1d without EOLs) */
|
||||||
void
|
void
|
||||||
MHexpand(struct pagenode *pn, drawfunc df)
|
MHexpand(pagenode *pn, drawfunc df)
|
||||||
{
|
{
|
||||||
int a0; /* reference element */
|
int a0; /* reference element */
|
||||||
int lastx; /* copy line width to register */
|
int lastx; /* copy line width to register */
|
||||||
|
@ -396,7 +396,7 @@ MHexpand(struct pagenode *pn, drawfunc df)
|
||||||
|
|
||||||
/* Expand group-3 1-dimensional data */
|
/* Expand group-3 1-dimensional data */
|
||||||
void
|
void
|
||||||
g31expand(struct pagenode *pn, drawfunc df)
|
g31expand(pagenode *pn, drawfunc df)
|
||||||
{
|
{
|
||||||
int a0; /* reference element */
|
int a0; /* reference element */
|
||||||
int lastx; /* copy line width to register */
|
int lastx; /* copy line width to register */
|
||||||
|
@ -480,7 +480,7 @@ g31expand(struct pagenode *pn, drawfunc df)
|
||||||
|
|
||||||
/* Expand group-3 2-dimensional data */
|
/* Expand group-3 2-dimensional data */
|
||||||
void
|
void
|
||||||
g32expand(struct pagenode *pn, drawfunc df)
|
g32expand(pagenode *pn, drawfunc df)
|
||||||
{
|
{
|
||||||
int RunLength; /* Length of current run */
|
int RunLength; /* Length of current run */
|
||||||
int a0; /* reference element */
|
int a0; /* reference element */
|
||||||
|
@ -600,7 +600,7 @@ g32expand(struct pagenode *pn, drawfunc df)
|
||||||
|
|
||||||
/* Expand group-4 data */
|
/* Expand group-4 data */
|
||||||
void
|
void
|
||||||
g4expand(struct pagenode *pn, drawfunc df)
|
g4expand(pagenode *pn, drawfunc df)
|
||||||
{
|
{
|
||||||
int RunLength; /* Length of current run */
|
int RunLength; /* Length of current run */
|
||||||
int a0; /* reference element */
|
int a0; /* reference element */
|
||||||
|
@ -717,7 +717,7 @@ static const unsigned char zerotab[256] = {
|
||||||
|
|
||||||
/* count fax lines */
|
/* count fax lines */
|
||||||
int
|
int
|
||||||
G3count(struct pagenode *pn, int twoD)
|
G3count(pagenode *pn, int twoD)
|
||||||
{
|
{
|
||||||
t16bits *p = pn->data;
|
t16bits *p = pn->data;
|
||||||
t16bits *end = p + pn->length/sizeof(*p);
|
t16bits *end = p + pn->length/sizeof(*p);
|
||||||
|
|
|
@ -91,13 +91,13 @@ void MDDocument::slotKIOData(KIO::Job *kiojob, const QByteArray &data)
|
||||||
|
|
||||||
void MDDocument::slotKIOResult(KJob *kiojob)
|
void MDDocument::slotKIOResult(KJob *kiojob)
|
||||||
{
|
{
|
||||||
KIO::TransferJob *transferjob = static_cast<KIO::TransferJob*>(kiojob);
|
KIO::TransferJob *transferjob = qobject_cast<KIO::TransferJob*>(kiojob);
|
||||||
if (kiojob->error() != 0) {
|
if (transferjob->error() != 0) {
|
||||||
kWarning() << "Could not fetch resource";
|
kWarning() << "Could not fetch resource";
|
||||||
} else {
|
} else {
|
||||||
kDebug() << "Resource fetched";
|
kDebug() << "Resource fetched";
|
||||||
}
|
}
|
||||||
kiojob->deleteLater();
|
transferjob->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_document_md.cpp"
|
#include "moc_document_md.cpp"
|
||||||
|
|
|
@ -118,32 +118,6 @@ static QRectF stringToRectF( const QString &data )
|
||||||
return QRectF( origin, size );
|
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
|
// Read next token of abbreviated path data
|
||||||
static bool nextAbbPathToken(AbbPathToken *token)
|
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 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 )
|
static QColor interpolatedColor( const QColor &c1, const QColor &c2 )
|
||||||
{
|
{
|
||||||
QColor res;
|
QColor res;
|
||||||
|
|
|
@ -32,25 +32,6 @@
|
||||||
#include "core/movie.h"
|
#include "core/movie.h"
|
||||||
#include "snapshottaker.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. */
|
/* Private storage. */
|
||||||
class VideoWidget::Private
|
class VideoWidget::Private
|
||||||
{
|
{
|
||||||
|
|
|
@ -165,7 +165,7 @@ QString LibPartedPartitionTable::createPartition(Report& report, const Partition
|
||||||
else if (partition.roles().has(PartitionRole::Primary))
|
else if (partition.roles().has(PartitionRole::Primary))
|
||||||
pedType = PED_PARTITION_NORMAL;
|
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());
|
report.line() << i18nc("@info/plain", "Unknown partition role for new partition <filename>%1</filename> (roles: %2)", partition.deviceNode(), partition.roles().toString());
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Add table
Reference in a new issue