Commit 705c979c authored by Tobias Hunger's avatar Tobias Hunger

QmlEditorWidgets: Remove dead code

Change-Id: I4eb3128023061f4cfa07a166d1f3ed188e1d70db
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent c3e5d3c7
......@@ -53,27 +53,6 @@ using namespace Utils;
namespace QmlEditorWidgets {
/* XPM */
static const char * const line_xpm[] = {
"14 14 3 1",
" c None",
". c #0c0c0c",
"x c #1c1c1c",
"............. ",
". . ",
". x x . ",
". x x . ",
". x x . ",
". x x . ",
". x . ",
". x x . ",
". x x . ",
". x x . ",
". x x . ",
". . ",
"............. ",
" "};
/* XPM */
static const char * pin_xpm[] = {
"12 9 7 1",
......
......@@ -779,43 +779,6 @@ static inline int limitPositive(int i)
return 0;
}
static inline int limit(int i, int zoom)
{
static bool flag1 = 1;
static bool flag2 = 1;
if (zoom == 1)
return i;
if (i < 0) {
int v = i / zoom;
if (v)
return v;
if (zoom == 2) {
flag1 =!flag1;
return flag1 ? -1 : 0;
}
flag1 =!flag1;
if (flag1)
flag2 =!flag2;
return flag1 && flag2 ? -1 : 0;
}
if (i > 0) {
int v = i / zoom;
if (v)
return v;
if (zoom == 2) {
flag1 =!flag1;
return flag1 ? 1 : 0;
}
flag1 =!flag1;
if (flag1)
flag2 =!flag2;
return flag1 && flag2 ? 1 : 0;
}
return 0;
}
void PreviewLabel::mouseMoveEvent(QMouseEvent * event)
{
if (!m_borderImage)
......
......@@ -52,13 +52,6 @@ void GradientLine::setGradient(const QLinearGradient &gradient)
readGradient();
}
static inline QColor invertColor(const QColor color)
{
QColor c = color.toHsv();
c.setHsv(c.hue(), c.saturation(), 255 - c.value());
return c;
}
GradientLine::GradientLine(QWidget *parent) :
QWidget(parent),
m_activeColor(Qt::black),
......@@ -327,19 +320,6 @@ void GradientLine::setup()
}
static inline QColor normalizeColor(const QColor &color)
{
QColor newColor = QColor(color.name());
newColor.setAlpha(color.alpha());
return newColor;
}
static inline qreal roundReal(qreal real)
{
int i = real * 100;
return qreal(i) / 100;
}
void GradientLine::updateGradient()
{
if (m_useGradient) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment