@ -89,15 +89,6 @@
# include "core/memcheck.h"
# include "core/memcheck.h"
# ifdef Q_OS_LINUX
# include <QProcess>
bool onboardIsAlreadyRunning = true ;
# endif
# ifdef Q_OS_OSX
# include <QProcess>
# endif
UBBoardController : : UBBoardController ( UBMainWindow * mainWindow )
UBBoardController : : UBBoardController ( UBMainWindow * mainWindow )
: UBDocumentContainer ( mainWindow - > centralWidget ( ) )
: UBDocumentContainer ( mainWindow - > centralWidget ( ) )
, mMainWindow ( mainWindow )
, mMainWindow ( mainWindow )
@ -172,12 +163,6 @@ void UBBoardController::init()
UBBoardController : : ~ UBBoardController ( )
UBBoardController : : ~ UBBoardController ( )
{
{
# ifdef Q_OS_LINUX
if ( ! onboardIsAlreadyRunning ) {
QProcess newProcess ;
newProcess . startDetached ( " killall onboard " ) ;
}
# endif
delete mDisplayView ;
delete mDisplayView ;
}
}
@ -836,36 +821,11 @@ void UBBoardController::showKeyboard(bool show)
if ( show )
if ( show )
UBDrawingController : : drawingController ( ) - > setStylusTool ( UBStylusTool : : Selector ) ;
UBDrawingController : : drawingController ( ) - > setStylusTool ( UBStylusTool : : Selector ) ;
# ifdef Q_OS_LINUX
if ( UBSettings : : settings ( ) - > useSystemOnScreenKeybard - > get ( ) . toBool ( ) )
static bool isFirstTime = true ;
UBPlatformUtils : : showOSK ( show ) ;
if ( isFirstTime ) {
QProcess isAlreadyRunningProcess ;
QString psAuxGrepC = " ps aux " ;
isAlreadyRunningProcess . start ( psAuxGrepC ) ;
isAlreadyRunningProcess . waitForFinished ( ) ;
QString output ( isAlreadyRunningProcess . readAll ( ) ) ;
if ( output . count ( " onboard " ) ! = 0 )
onboardIsAlreadyRunning = true ;
else
onboardIsAlreadyRunning = false ;
isFirstTime = false ;
}
if ( UBSettings : : settings ( ) - > useSystemOnScreenKeybard - > get ( ) . toBool ( ) ) {
QProcess newProcess ;
newProcess . startDetached ( " /usr/bin/onboard " ) ;
}
else
else
mPaletteManager - > showVirtualKeyboard ( show ) ;
mPaletteManager - > showVirtualKeyboard ( show ) ;
# elif defined(Q_OS_OSX)
if ( UBSettings : : settings ( ) - > useSystemOnScreenKeybard - > get ( ) . toBool ( ) )
UBPlatformUtils : : showOSK ( ) ;
# else
mPaletteManager - > showVirtualKeyboard ( show ) ;
# endif
}
}