From 5e8185513d4712ebbb649bbbfcd2d4ed75ffff66 Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Wed, 26 Jan 2022 18:06:18 +0900 Subject: Supersedes deprecated function calls Signed-off-by: OBATA Akio --- kcoloredit/paletteviewscrolledarea.cpp | 2 +- kmrml/kmrml/lib/mrml_utils.cpp | 4 ++-- kmrml/kmrml/loader.cpp | 4 ++-- kolourpaint/kptool.cpp | 22 ++++++++-------------- kpovmodeler/pmerrordialog.cpp | 16 +++++++++------- kpovmodeler/pmpovraywidget.cpp | 2 +- kuickshow/src/kuickshow.cpp | 2 +- 7 files changed, 24 insertions(+), 28 deletions(-) diff --git a/kcoloredit/paletteviewscrolledarea.cpp b/kcoloredit/paletteviewscrolledarea.cpp index 3a70aacc..cca9e39a 100644 --- a/kcoloredit/paletteviewscrolledarea.cpp +++ b/kcoloredit/paletteviewscrolledarea.cpp @@ -372,7 +372,7 @@ void PaletteViewScrolledArea::mouseMoveEvent(TQMouseEvent* event) { if(abs( event->x() - colorDragPoint.x() ) > 2 || abs( event->y() - colorDragPoint.y() ) > 2) { TQColor draggedColor = color(colorDragPoint); - KColorDrag* colorDrag = KColorDrag::makeDrag(draggedColor, this); + KColorDrag* colorDrag = new KColorDrag(draggedColor, this); colorDrag->dragCopy(); } else colorChosen = true; diff --git a/kmrml/kmrml/lib/mrml_utils.cpp b/kmrml/kmrml/lib/mrml_utils.cpp index 314bbc7b..43e84dae 100644 --- a/kmrml/kmrml/lib/mrml_utils.cpp +++ b/kmrml/kmrml/lib/mrml_utils.cpp @@ -34,7 +34,7 @@ using namespace KMrml; KStaticDeleter utils_sd; -Util *Util::s_self = 0L; +Util *Util::s_self = nullptr; Util::Util() { @@ -56,7 +56,7 @@ Util::~Util() Util *Util::self() { if ( !s_self ) - s_self = utils_sd.setObject( new Util() ); + utils_sd.setObject( s_self, new Util() ); return s_self; } diff --git a/kmrml/kmrml/loader.cpp b/kmrml/kmrml/loader.cpp index 576513ed..2925aa9c 100644 --- a/kmrml/kmrml/loader.cpp +++ b/kmrml/kmrml/loader.cpp @@ -21,14 +21,14 @@ #include "loader.h" -Loader *Loader::s_self = 0L; +Loader *Loader::s_self = nullptr; KStaticDeleter sd; Loader * Loader::self() { if ( !s_self ) - s_self = sd.setObject( new Loader() ); + sd.setObject( s_self, new Loader() ); return s_self; } diff --git a/kolourpaint/kptool.cpp b/kolourpaint/kptool.cpp index fea1cf58..0327f8be 100644 --- a/kolourpaint/kptool.cpp +++ b/kolourpaint/kptool.cpp @@ -499,14 +499,11 @@ void kpTool::beginInternal () m_beganDraw = false; - uint keyState = TDEApplication::keyboardModifiers (); + TQt::ButtonState keyState = TDEApplication::keyboardMouseState (); - m_shiftPressed = (keyState & TDEApplication::ShiftModifier); - m_controlPressed = (keyState & TDEApplication::ControlModifier); - - // TODO: Can't do much about ALT - unless it's always TDEApplication::Modifier1? - // Ditto for everywhere else where I set SHIFT & CTRL but not alt. - m_altPressed = false; + m_shiftPressed = (keyState & TQt::ShiftButton); + m_controlPressed = (keyState & TQt::ControlButton); + m_altPressed = (keyState & TQt::AltButton); } } @@ -1372,14 +1369,11 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e) #if DEBUG_KP_TOOL && 0 kdDebug () << "\t\tmodifiers not changed - figure out the truth" << endl; #endif - uint keyState = TDEApplication::keyboardModifiers (); - - setShiftPressed (keyState & TDEApplication::ShiftModifier); - setControlPressed (keyState & TDEApplication::ControlModifier); + TQt::ButtonState keyState = TDEApplication::keyboardMouseState (); - // TODO: Can't do much about ALT - unless it's always TDEApplication::Modifier1? - // Ditto for everywhere else where I set SHIFT & CTRL but not alt. - setAltPressed (e->stateAfter () & TQt::AltButton); + setShiftPressed (keyState & TQt::ShiftButton); + setControlPressed (keyState & TQt::ControlButton); + setAltPressed ( keyState & TQt::AltButton); } } diff --git a/kpovmodeler/pmerrordialog.cpp b/kpovmodeler/pmerrordialog.cpp index 0fdb6f5f..6ce6a45f 100644 --- a/kpovmodeler/pmerrordialog.cpp +++ b/kpovmodeler/pmerrordialog.cpp @@ -83,14 +83,16 @@ PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags, else text->setText( i18n( "There were errors:" ) ); - setButtonOKText( KStdGuiItem::ok().text(), - i18n( "Proceed" ), - i18n( "When clicking Proceed, the program\n" + KGuiItem ok = KStdGuiItem::ok(); + ok.setToolTip( i18n( "Proceed" ) ); + ok.setWhatsThis( i18n( "When clicking Proceed, the program\n" "will try to proceed with the current action." ) ); - setButtonCancelText( KStdGuiItem::cancel().text(), - i18n( "&Cancel" ), - i18n( "When clicking Cancel, the program\n" - "will cancel the current action." ) ); + setButtonOK( ok ); + KGuiItem cancel = KStdGuiItem::cancel(); + ok.setToolTip( i18n( "&Cancel" ) ); + ok.setWhatsThis( i18n( "When clicking Cancel, the program\n" + "will cancel the current action." ) ); + setButtonCancel( cancel ); if( errorFlags & PMEFatal ) showButtonOK( false ); diff --git a/kpovmodeler/pmpovraywidget.cpp b/kpovmodeler/pmpovraywidget.cpp index ac1162c2..91dcf119 100644 --- a/kpovmodeler/pmpovraywidget.cpp +++ b/kpovmodeler/pmpovraywidget.cpp @@ -294,7 +294,7 @@ void PMPovrayWidget::slotSave( ) if( tempFile ) { tempFile->close( ); - ok = TDEIO::NetAccess::upload( tempFile->name( ), url ); + ok = TDEIO::NetAccess::upload( tempFile->name( ), url, (TQWidget*)nullptr ); tempFile->unlink( ); file = 0; } diff --git a/kuickshow/src/kuickshow.cpp b/kuickshow/src/kuickshow.cpp index f6260aae..e41e5463 100644 --- a/kuickshow/src/kuickshow.cpp +++ b/kuickshow/src/kuickshow.cpp @@ -290,7 +290,7 @@ void KuickShow::initGUI( const KURL& startDir ) // remove TQString() parameter -- ellis coll->readShortcutSettings( TQString() ); - m_accel = coll->accel(); + m_accel = coll->tdeaccel(); // menubar KMenuBar *mBar = menuBar(); -- cgit v1.2.1