Port libkwineffects away from KDebug

And with that it doesn't need kde4support anymore.
This commit is contained in:
Martin Gräßlin 2013-09-02 10:43:55 +02:00
parent 489addf901
commit 99bcac1cc7
5 changed files with 9 additions and 13 deletions

View file

@ -17,7 +17,6 @@ set(kwineffects_QT_LIBS
set(kwineffects_KDE_LIBS
KF5::XmlGui # needed for KShortcutEditor
${KDE4Support_LIBRARIES} # needed for KDebug
)
set(kwineffects_XLIB_LIBS

View file

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "anidata_p.h"
#include <KDebug>
#include <QDebug>
QDebug operator<<(QDebug dbg, const KWin::AniData &a)
{
@ -80,7 +80,7 @@ static FPx2 fpx2(const QString &s, AnimationEffect::Attribute a)
a == AnimationEffect::Size ||
a == AnimationEffect::Rotation)) ) {
if (ok)
kDebug(1212) << "Invalid value (must not be negative)" << s;
qDebug() << "Invalid value (must not be negative)" << s;
return FPx2();
}
@ -96,7 +96,7 @@ static FPx2 fpx2(const QString &s, AnimationEffect::Attribute a)
f2 = f1;
}
if ( forced_align && a >= AnimationEffect::NonFloatBase )
kDebug(1212) << "Generic Animations, WARNING: had to align second dimension of non-onedimensional attribute" << a;
qDebug() << "Generic Animations, WARNING: had to align second dimension of non-onedimensional attribute" << a;
return FPx2(f1, f2);
}
@ -122,7 +122,7 @@ AniData::AniData(const QString &str) // format: WindowMask:Attribute:Meta:Durati
else if (animation.at(1) == QStringLiteral("Size")) attribute = AnimationEffect::Size;
else if (animation.at(1) == QStringLiteral("Clip")) attribute = AnimationEffect::Clip;
else {
kDebug(1212) << "Invalid attribute" << animation.at(1);
qDebug() << "Invalid attribute" << animation.at(1);
return;
}
@ -131,7 +131,7 @@ AniData::AniData(const QString &str) // format: WindowMask:Attribute:Meta:Durati
bool ok;
duration = animation.at(3).toInt(&ok);
if (!ok || duration < 0) {
kDebug(1212) << "Invalid duration" << animation.at(3);
qDebug() << "Invalid duration" << animation.at(3);
duration = 0;
return;
}
@ -145,12 +145,12 @@ AniData::AniData(const QString &str) // format: WindowMask:Attribute:Meta:Durati
else if (customCurve == Gaussian)
curve.setCustomType(AnimationEffect::qecGaussian);
else
kDebug(1212) << "Unknown curve type" << customCurve; // remains default, ie. linear
qDebug() << "Unknown curve type" << customCurve; // remains default, ie. linear
if (animation.count() > 6) {
int t = animation.at(6).toInt();
if (t < 0)
kDebug(1212) << "Delay can not be negative" << animation.at(6);
qDebug() << "Delay can not be negative" << animation.at(6);
else
time = t;

View file

@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QGraphicsRotation>
#include <QGraphicsScale>
#include <kdebug.h>
#include <ksharedconfig.h>
#include <kconfiggroup.h>

View file

@ -24,8 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <assert.h>
#include <kdebug.h>
#include <X11/Xlib.h>
#include <X11/extensions/shape.h>

View file

@ -21,9 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "kwinxrenderutils.h"
#include "kwinglobals.h"
#include <QDebug>
#include <QStack>
#include <QPixmap>
#include <kdebug.h>
namespace KWin
{
@ -99,7 +99,7 @@ static xcb_render_picture_t createPicture(xcb_pixmap_t pix, int depth)
}
QHash<int, xcb_render_pictformat_t>::const_iterator it = s_renderFormats.constFind(depth);
if (it == s_renderFormats.constEnd()) {
kWarning(1212) << "Could not find XRender format for depth" << depth;
qWarning() << "Could not find XRender format for depth" << depth;
return XCB_RENDER_PICTURE_NONE;
}
xcb_render_picture_t pic = xcb_generate_id(connection());