Commit fab661bd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port deprecated methods/enum

parent 5ca26287
......@@ -96,7 +96,7 @@ int main(int argc, char *argv [])
{
// Creates a kpMainWindow using the default constructor and then
// calls kpMainWindow::readProperties().
RESTORE(kpMainWindow)
kRestoreMainWindows<kpMainWindow>();
}
else
{
......
......@@ -67,7 +67,7 @@ void kpTool::mousePressEvent (QMouseEvent *e)
<< " beganDraw=" << d->beganDraw << endl;
#endif
if (e->button () == Qt::MidButton)
if (e->button () == Qt::MiddleButton)
{
const QString text = QApplication::clipboard ()->text (QClipboard::Selection);
#if DEBUG_KP_TOOL && 1
......
......@@ -207,7 +207,7 @@ bool kpTool::currentPointCardinallyNextToLast () const
int kpTool::mouseButton (Qt::MouseButtons mouseButtons)
{
// we have nothing to do with mid-buttons
if (mouseButtons & Qt::MidButton) {
if (mouseButtons & Qt::MiddleButton) {
return -1;
}
......
......@@ -659,7 +659,7 @@ QVariant kpView::inputMethodQuery (Qt::InputMethodQuery query) const
QVariant ret;
switch (query)
{
case Qt::ImMicroFocus:
case Qt::ImCursorRectangle:
{
QRect r = d->viewManager->textCursorRect ();
r.setTopLeft (r.topLeft () + origin ());
......
......@@ -315,8 +315,7 @@ QSize kpIntNumInput::minimumSizeHint() const
h = qMax(h, priv->labelSize.height() + 2);
}
const int spacingHint = style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
w = priv->slider ? priv->slider->sizeHint().width() + spacingHint : 0;
w = priv->slider ? priv->slider->sizeHint().width() : 0;
w += priv->column1Width + priv->column2Width;
if (priv->labelAlignment & (Qt::AlignTop | Qt::AlignBottom)) {
......@@ -344,7 +343,7 @@ void kpIntNumInput::resizeEvent(QResizeEvent *e)
int w = priv->column1Width;
int h = 0;
const int spacingHint = style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
const int spacingHint = 0;//style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
if (priv->label && (priv->labelAlignment & Qt::AlignTop)) {
priv->label->setGeometry(0, 0, e->size().width(), priv->labelSize.height());
......@@ -524,7 +523,7 @@ QSize kpDoubleNumInput::minimumSizeHint() const
h = qMax(h, priv->labelSize.height() + 2);
}
const int spacingHint = style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
const int spacingHint = 0;//style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
w = priv->slider ? priv->slider->sizeHint().width() + spacingHint : 0;
w += priv->column1Width + priv->column2Width;
......@@ -541,7 +540,7 @@ void kpDoubleNumInput::resizeEvent(QResizeEvent *e)
int w = priv->column1Width;
int h = 0;
const int spacingHint = style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
const int spacingHint = 0;//style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
if (priv->label && (priv->labelAlignment & Qt::AlignTop)) {
priv->label->setGeometry(0, 0, e->size().width(), priv->labelSize.height());
......
......@@ -60,7 +60,7 @@ kpColorToolBar::kpColorToolBar (const QString &label, QWidget *parent)
QWidget *base = new QWidget (this);
m_boxLayout = new QBoxLayout (QBoxLayout::LeftToRight, base);
m_boxLayout->setMargin (5);
m_boxLayout->setContentsMargins(5, 5, 5, 5);
m_boxLayout->setSpacing (10 * 3);
// This holds the current global foreground and background colors, for
......
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