Commit 64c56e73 authored by Laurent Montel's avatar Laurent Montel 😁

Remove deprecated method

parent 5cdeaa73
......@@ -33,7 +33,7 @@ KCMComponentChooser::KCMComponentChooser(QWidget *parent, const QVariantList &):
KCModule(parent) {
QVBoxLayout *lay = new QVBoxLayout(this);
lay->setMargin(0);
lay->setContentsMargins(0, 0, 0, 0);
m_chooser=new ComponentChooser(this);
lay->addWidget(m_chooser);
......
......@@ -75,7 +75,7 @@ KclockModule::KclockModule(QWidget *parent, const QVariantList &)
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(KDialog::spacingHint());
dtime = new Dtime(this, m_haveTimedated);
......
......@@ -108,7 +108,7 @@ DesktopPathConfig::DesktopPathConfig(QWidget *parent, const QVariantList &)
{
QFormLayout *lay = new QFormLayout(this);
lay->setVerticalSpacing(0);
lay->setMargin(0);
lay->setContentsMargins(0, 0, 0, 0);
setQuickHelp( i18n("<h1>Paths</h1>\n"
"This module allows you to choose where in the filesystem the "
......
......@@ -71,7 +71,7 @@ Joystick::Joystick(QWidget *parent, const QVariantList &)
joyWidget = new JoyWidget(this);
QVBoxLayout *top = new QVBoxLayout(this);
top->setMargin(0);
top->setContentsMargins(0, 0, 0, 0);
top->setSpacing(KDialog::spacingHint());
top->addWidget(joyWidget);
}
......
......@@ -67,7 +67,7 @@ JoyWidget::JoyWidget(QWidget *parent)
{
QVBoxLayout *mainVbox = new QVBoxLayout(this);
mainVbox->setSpacing(KDialog::spacingHint());
mainVbox->setMargin(0);
mainVbox->setContentsMargins(0, 0, 0, 0);
// create area to show an icon + message if no joystick was detected
{
......
......@@ -59,7 +59,7 @@ KCMKeyboard::KCMKeyboard(QWidget *parent, const QVariantList &args)
keyboardConfig = new KeyboardConfig();
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
// layout->setSpacing(KDialog::spacingHint());
widget = new KCMKeyboardWidget(rules, keyboardConfig, args, parent);
......
......@@ -83,7 +83,7 @@ CDuplicatesDialog::CDuplicatesDialog(QWidget *parent, CFontList *fl)
mainLayout->addWidget(itsButtonBox);
QGridLayout *layout=new QGridLayout(page);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
itsLabel=new QLabel(page);
itsView=new CFontFileListView(page);
......
......@@ -209,11 +209,11 @@ CKCmFontInst::CKCmFontInst(QWidget *parent, const QVariantList&)
*fontsLayout=new QBoxLayout(QBoxLayout::TopToBottom, fontWidget),
*fontControlLayout=new QBoxLayout(QBoxLayout::LeftToRight, fontControlWidget);
toolbarLayout->setMargin(0);
mainLayout->setMargin(0);
groupsLayout->setMargin(0);
fontsLayout->setMargin(0);
fontControlLayout->setMargin(0);
toolbarLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->setContentsMargins(0, 0, 0, 0);
groupsLayout->setContentsMargins(0, 0, 0, 0);
fontsLayout->setContentsMargins(0, 0, 0, 0);
fontControlLayout->setContentsMargins(0, 0, 0, 0);
// Toolbar...
duplicateFontsAct=new QAction(QIcon::fromTheme("system-search"), i18n("Scan for Duplicate Fonts..."), this);
......@@ -254,14 +254,14 @@ CKCmFontInst::CKCmFontInst(QWidget *parent, const QVariantList&)
itsPreviewWidget = new QWidget(this);
QBoxLayout *previewWidgetLayout = new QBoxLayout(QBoxLayout::TopToBottom, itsPreviewWidget);
previewWidgetLayout->setMargin(0);
previewWidgetLayout->setContentsMargins(0, 0, 0, 0);
previewWidgetLayout->setSpacing(0);
// Preview
QFrame *previewFrame=new QFrame(itsPreviewWidget);
QBoxLayout *previewFrameLayout=new QBoxLayout(QBoxLayout::LeftToRight, previewFrame);
previewFrameLayout->setMargin(0);
previewFrameLayout->setContentsMargins(0, 0, 0, 0);
previewFrameLayout->setSpacing(0);
previewFrame->setFrameShape(QFrame::StyledPanel);
previewFrame->setFrameShadow(QFrame::Sunken);
......
......@@ -51,7 +51,7 @@ CPrintDialog::CPrintDialog(QWidget *parent)
QFrame *page = new QFrame(this);
QGridLayout *layout=new QGridLayout(page);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
QLabel *lbl=new QLabel(i18n("Select size to print font:"), page);
lbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
......
......@@ -101,10 +101,10 @@ CFontViewPart::CFontViewPart(QWidget *parentWidget, QObject *parent, const QList
// itsMetaLabel=new QLabel(metaBox);
// itsMetaLabel->setAlignment(Qt::AlignTop);
// metaLayout->addWidget(itsMetaLabel);
previewLayout->setMargin(0);
previewLayout->setContentsMargins(0, 0, 0, 0);
previewLayout->setSpacing(0);
faceLayout->setMargin(0);
controlsLayout->setMargin(0);
faceLayout->setContentsMargins(0, 0, 0, 0);
controlsLayout->setContentsMargins(0, 0, 0, 0);
previewLayout->setSpacing(0);
itsFrame->setFrameShape(QFrame::NoFrame);
......
......@@ -136,7 +136,7 @@ static void applyQtColors( KSharedConfigPtr kglobalcfg, QSettings& settings, QPa
KConfigGroup wmCfgGroup(kglobalcfg, "WM");
// active colors
QColor clr = newPal.color( QPalette::Active, QPalette::Background );
QColor clr = newPal.color( QPalette::Active, QPalette::Window );
clr = wmCfgGroup.readEntry("activeBackground", clr);
settings.setValue(QStringLiteral("/qt/KWinPalette/activeBackground"), clr.name());
if (QPixmap::defaultDepth() > 8)
......@@ -146,24 +146,24 @@ static void applyQtColors( KSharedConfigPtr kglobalcfg, QSettings& settings, QPa
clr = newPal.color( QPalette::Active, QPalette::HighlightedText );
clr = wmCfgGroup.readEntry("activeForeground", clr);
settings.setValue(QStringLiteral("/qt/KWinPalette/activeForeground"), clr.name());
clr = newPal.color( QPalette::Active,QPalette::Background );
clr = newPal.color( QPalette::Active,QPalette::Window );
clr = wmCfgGroup.readEntry("frame", clr);
settings.setValue(QStringLiteral("/qt/KWinPalette/frame"), clr.name());
clr = wmCfgGroup.readEntry("activeTitleBtnBg", clr);
settings.setValue(QStringLiteral("/qt/KWinPalette/activeTitleBtnBg"), clr.name());
// inactive colors
clr = newPal.color(QPalette::Inactive, QPalette::Background);
clr = newPal.color(QPalette::Inactive, QPalette::Window);
clr = wmCfgGroup.readEntry("inactiveBackground", clr);
settings.setValue(QStringLiteral("/qt/KWinPalette/inactiveBackground"), clr.name());
if (QPixmap::defaultDepth() > 8)
clr = clr.dark(110);
clr = wmCfgGroup.readEntry("inactiveBlend", clr);
settings.setValue(QStringLiteral("/qt/KWinPalette/inactiveBlend"), clr.name());
clr = newPal.color(QPalette::Inactive, QPalette::Background).dark();
clr = newPal.color(QPalette::Inactive, QPalette::Window).dark();
clr = wmCfgGroup.readEntry("inactiveForeground", clr);
settings.setValue(QStringLiteral("/qt/KWinPalette/inactiveForeground"), clr.name());
clr = newPal.color(QPalette::Inactive, QPalette::Background);
clr = newPal.color(QPalette::Inactive, QPalette::Window);
clr = wmCfgGroup.readEntry("inactiveFrame", clr);
settings.setValue(QStringLiteral("/qt/KWinPalette/inactiveFrame"), clr.name());
clr = wmCfgGroup.readEntry("inactiveTitleBtnBg", clr);
......@@ -343,15 +343,15 @@ static void createGtkrc( bool exportColors, const QPalette& cg, bool exportGtkTh
{
t << "style \"default\"" << endl;
t << "{" << endl;
t << " bg[NORMAL] = " << color( cg.color( QPalette::Active, QPalette::Background ) ) << endl;
t << " bg[NORMAL] = " << color( cg.color( QPalette::Active, QPalette::Window ) ) << endl;
t << " bg[SELECTED] = " << color( cg.color(QPalette::Active, QPalette::Highlight) ) << endl;
t << " bg[INSENSITIVE] = " << color( cg.color( QPalette::Active, QPalette::Background ) ) << endl;
t << " bg[INSENSITIVE] = " << color( cg.color( QPalette::Active, QPalette::Window ) ) << endl;
t << " bg[ACTIVE] = " << color( cg.color( QPalette::Active, QPalette::Mid ) ) << endl;
t << " bg[PRELIGHT] = " << color( cg.color( QPalette::Active, QPalette::Background ) ) << endl;
t << " bg[PRELIGHT] = " << color( cg.color( QPalette::Active, QPalette::Window ) ) << endl;
t << endl;
t << " base[NORMAL] = " << color( cg.color( QPalette::Active, QPalette::Base ) ) << endl;
t << " base[SELECTED] = " << color( cg.color(QPalette::Active, QPalette::Highlight) ) << endl;
t << " base[INSENSITIVE] = " << color( cg.color( QPalette::Active, QPalette::Background ) ) << endl;
t << " base[INSENSITIVE] = " << color( cg.color( QPalette::Active, QPalette::Window ) ) << endl;
t << " base[ACTIVE] = " << color( cg.color(QPalette::Active, QPalette::Highlight) ) << endl;
t << " base[PRELIGHT] = " << color( cg.color(QPalette::Active, QPalette::Highlight) ) << endl;
t << endl;
......@@ -361,11 +361,11 @@ static void createGtkrc( bool exportColors, const QPalette& cg, bool exportGtkTh
t << " text[ACTIVE] = " << color( cg.color(QPalette::Active, QPalette::HighlightedText) ) << endl;
t << " text[PRELIGHT] = " << color( cg.color(QPalette::Active, QPalette::HighlightedText) ) << endl;
t << endl;
t << " fg[NORMAL] = " << color ( cg.color( QPalette::Active, QPalette::Foreground ) ) << endl;
t << " fg[NORMAL] = " << color ( cg.color( QPalette::Active, QPalette::WindowText ) ) << endl;
t << " fg[SELECTED] = " << color( cg.color(QPalette::Active, QPalette::HighlightedText) ) << endl;
t << " fg[INSENSITIVE] = " << color( cg.color( QPalette::Active, QPalette::Mid ) ) << endl;
t << " fg[ACTIVE] = " << color( cg.color( QPalette::Active, QPalette::Foreground ) ) << endl;
t << " fg[PRELIGHT] = " << color( cg.color( QPalette::Active, QPalette::Foreground ) ) << endl;
t << " fg[ACTIVE] = " << color( cg.color( QPalette::Active, QPalette::WindowText ) ) << endl;
t << " fg[PRELIGHT] = " << color( cg.color( QPalette::Active, QPalette::WindowText ) ) << endl;
t << "}" << endl;
t << endl;
t << "class \"*\" style \"default\"" << endl;
......@@ -439,8 +439,8 @@ void runRdb( uint flags )
{
KConfigGroup g(KSharedConfig::openConfig(), "WM");
QString preproc;
QColor backCol = newPal.color( QPalette::Active, QPalette::Background );
addColorDef(preproc, "FOREGROUND" , newPal.color( QPalette::Active, QPalette::Foreground ) );
QColor backCol = newPal.color( QPalette::Active, QPalette::Window );
addColorDef(preproc, "FOREGROUND" , newPal.color( QPalette::Active, QPalette::WindowText ) );
addColorDef(preproc, "BACKGROUND" , backCol);
addColorDef(preproc, "HIGHLIGHT" , backCol.light(100+(2*KColorScheme::contrast()+4)*16/1));
addColorDef(preproc, "LOWLIGHT" , backCol.dark(100+(2*KColorScheme::contrast()+4)*10));
......
......@@ -55,7 +55,7 @@ SMServerConfig::SMServerConfig(QWidget *parent, const QVariantList &args)
" exit by default."));
QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(0);
topLayout->setContentsMargins(0, 0, 0, 0);
dialog = new SMServerConfigImpl(this);
connect(dialog, SIGNAL(changed()), SLOT(changed()));
......
......@@ -45,7 +45,7 @@ PhononKcm::PhononKcm(QWidget *parent, const QVariantList &args)
setAboutData(about);
setLayout(new QHBoxLayout);
layout()->setMargin(0);
layout()->setContentsMargins(0, 0, 0, 0);
layout()->setSpacing(0);
m_tabs = new QTabWidget(this);
......
......@@ -33,7 +33,7 @@ SonnetSpellCheckingModule::SonnetSpellCheckingModule(QWidget* parent, const QVar
KCModule(parent)
{
QBoxLayout *layout = new QVBoxLayout( this );
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
m_configWidget = new Sonnet::ConfigWidget( this );
layout->addWidget(m_configWidget);
connect(m_configWidget, SIGNAL(configChanged()), this, SLOT(changed()));
......
......@@ -180,7 +180,7 @@ KCMStyle::KCMStyle( QWidget* parent, const QVariantList& )
// Setup pages and mainLayout
mainLayout = new QVBoxLayout( this );
mainLayout->setMargin(0);
mainLayout->setContentsMargins(0, 0, 0, 0);
tabWidget = new QTabWidget( this );
mainLayout->addWidget( tabWidget );
......
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