Supersedes deprecated function calls

Signed-off-by: OBATA Akio <obache@wizdas.com>
feat/supersedes-deprecated
OBATA Akio 3 years ago
parent 052f82743e
commit 5e8185513d

@ -372,7 +372,7 @@ void PaletteViewScrolledArea::mouseMoveEvent(TQMouseEvent* event) {
if(abs( event->x() - colorDragPoint.x() ) > 2 || if(abs( event->x() - colorDragPoint.x() ) > 2 ||
abs( event->y() - colorDragPoint.y() ) > 2) { abs( event->y() - colorDragPoint.y() ) > 2) {
TQColor draggedColor = color(colorDragPoint); TQColor draggedColor = color(colorDragPoint);
KColorDrag* colorDrag = KColorDrag::makeDrag(draggedColor, this); KColorDrag* colorDrag = new KColorDrag(draggedColor, this);
colorDrag->dragCopy(); colorDrag->dragCopy();
} else } else
colorChosen = true; colorChosen = true;

@ -34,7 +34,7 @@ using namespace KMrml;
KStaticDeleter<Util> utils_sd; KStaticDeleter<Util> utils_sd;
Util *Util::s_self = 0L; Util *Util::s_self = nullptr;
Util::Util() Util::Util()
{ {
@ -56,7 +56,7 @@ Util::~Util()
Util *Util::self() Util *Util::self()
{ {
if ( !s_self ) if ( !s_self )
s_self = utils_sd.setObject( new Util() ); utils_sd.setObject( s_self, new Util() );
return s_self; return s_self;
} }

@ -21,14 +21,14 @@
#include "loader.h" #include "loader.h"
Loader *Loader::s_self = 0L; Loader *Loader::s_self = nullptr;
KStaticDeleter<Loader> sd; KStaticDeleter<Loader> sd;
Loader * Loader::self() Loader * Loader::self()
{ {
if ( !s_self ) if ( !s_self )
s_self = sd.setObject( new Loader() ); sd.setObject( s_self, new Loader() );
return s_self; return s_self;
} }

@ -499,14 +499,11 @@ void kpTool::beginInternal ()
m_beganDraw = false; m_beganDraw = false;
uint keyState = TDEApplication::keyboardModifiers (); TQt::ButtonState keyState = TDEApplication::keyboardMouseState ();
m_shiftPressed = (keyState & TDEApplication::ShiftModifier); m_shiftPressed = (keyState & TQt::ShiftButton);
m_controlPressed = (keyState & TDEApplication::ControlModifier); m_controlPressed = (keyState & TQt::ControlButton);
m_altPressed = (keyState & TQt::AltButton);
// 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;
} }
} }
@ -1372,14 +1369,11 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e)
#if DEBUG_KP_TOOL && 0 #if DEBUG_KP_TOOL && 0
kdDebug () << "\t\tmodifiers not changed - figure out the truth" << endl; kdDebug () << "\t\tmodifiers not changed - figure out the truth" << endl;
#endif #endif
uint keyState = TDEApplication::keyboardModifiers (); TQt::ButtonState keyState = TDEApplication::keyboardMouseState ();
setShiftPressed (keyState & TDEApplication::ShiftModifier);
setControlPressed (keyState & TDEApplication::ControlModifier);
// TODO: Can't do much about ALT - unless it's always TDEApplication::Modifier1? setShiftPressed (keyState & TQt::ShiftButton);
// Ditto for everywhere else where I set SHIFT & CTRL but not alt. setControlPressed (keyState & TQt::ControlButton);
setAltPressed (e->stateAfter () & TQt::AltButton); setAltPressed ( keyState & TQt::AltButton);
} }
} }

@ -83,14 +83,16 @@ PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags,
else else
text->setText( i18n( "There were errors:" ) ); text->setText( i18n( "There were errors:" ) );
setButtonOKText( KStdGuiItem::ok().text(), KGuiItem ok = KStdGuiItem::ok();
i18n( "Proceed" ), ok.setToolTip( i18n( "Proceed" ) );
i18n( "When clicking <b>Proceed</b>, the program\n" ok.setWhatsThis( i18n( "When clicking <b>Proceed</b>, the program\n"
"will try to proceed with the current action." ) ); "will try to proceed with the current action." ) );
setButtonCancelText( KStdGuiItem::cancel().text(), setButtonOK( ok );
i18n( "&Cancel" ), KGuiItem cancel = KStdGuiItem::cancel();
i18n( "When clicking <b>Cancel<b>, the program\n" ok.setToolTip( i18n( "&Cancel" ) );
"will cancel the current action." ) ); ok.setWhatsThis( i18n( "When clicking <b>Cancel<b>, the program\n"
"will cancel the current action." ) );
setButtonCancel( cancel );
if( errorFlags & PMEFatal ) if( errorFlags & PMEFatal )
showButtonOK( false ); showButtonOK( false );

@ -294,7 +294,7 @@ void PMPovrayWidget::slotSave( )
if( tempFile ) if( tempFile )
{ {
tempFile->close( ); tempFile->close( );
ok = TDEIO::NetAccess::upload( tempFile->name( ), url ); ok = TDEIO::NetAccess::upload( tempFile->name( ), url, (TQWidget*)nullptr );
tempFile->unlink( ); tempFile->unlink( );
file = 0; file = 0;
} }

@ -290,7 +290,7 @@ void KuickShow::initGUI( const KURL& startDir )
// remove TQString() parameter -- ellis // remove TQString() parameter -- ellis
coll->readShortcutSettings( TQString() ); coll->readShortcutSettings( TQString() );
m_accel = coll->accel(); m_accel = coll->tdeaccel();
// menubar // menubar
KMenuBar *mBar = menuBar(); KMenuBar *mBar = menuBar();

Loading…
Cancel
Save