compiler errors/warnings fixed
This commit is contained in:
parent
7b8f0625c1
commit
9bf518145d
|
@ -160,9 +160,9 @@ void QskInputCompositionModel::composeKey( Qt::Key key )
|
||||||
QCoreApplication::sendEvent( focusWindow, &keyRelease );
|
QCoreApplication::sendEvent( focusWindow, &keyRelease );
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case Qt::Key_Left:
|
case Qt::Key_Left:
|
||||||
|
|
|
@ -18,13 +18,26 @@ QSK_SUBDIRS = \
|
||||||
$${QSK_ROOT}/src/dialogs
|
$${QSK_ROOT}/src/dialogs
|
||||||
|
|
||||||
INCLUDEPATH *= $${QSK_SUBDIRS}
|
INCLUDEPATH *= $${QSK_SUBDIRS}
|
||||||
INCLUDEPATH += ../3rdparty/pinyin/include
|
DEPENDPATH *= $${QSK_SUBDIRS}
|
||||||
DEPENDPATH += $${QSK_SUBDIRS}
|
|
||||||
|
|
||||||
DESTDIR = $${QSK_OUT_ROOT}/plugins/platforminputcontexts
|
DESTDIR = $${QSK_OUT_ROOT}/plugins/platforminputcontexts
|
||||||
|
|
||||||
QMAKE_RPATHDIR *= $${QSK_OUT_ROOT}/lib
|
QMAKE_RPATHDIR *= $${QSK_OUT_ROOT}/lib
|
||||||
LIBS *= -L$${QSK_OUT_ROOT}/lib -lqskinny -Wl,-Bstatic -L$${DESTDIR} -lqskinputcontext_pinyin -lqskinputcontext_hunspell -Wl,-Bdynamic
|
LIBS *= -L$${QSK_OUT_ROOT}/lib -lqskinny
|
||||||
|
|
||||||
|
# we need to write the lines below in a platform independent way: TODO ...
|
||||||
|
|
||||||
|
pinyin {
|
||||||
|
INCLUDEPATH *= $${QSK_ROOT}/3rdparty/pinyin/include
|
||||||
|
LIBS *= -Wl,-Bstatic -L$${DESTDIR} -lqskinputcontext_pinyin
|
||||||
|
}
|
||||||
|
|
||||||
|
hunspell {
|
||||||
|
INCLUDEPATH *= $${QSK_ROOT}/3rdparty/hunspell/src
|
||||||
|
LIBS *= -Wl,-Bstatic -L$${DESTDIR} -lqskinputcontext_hunspell
|
||||||
|
}
|
||||||
|
|
||||||
|
LIBS *= -Wl,-Bdynamic
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
contains(QSK_CONFIG, QskDll) {
|
contains(QSK_CONFIG, QskDll) {
|
||||||
|
|
|
@ -10,6 +10,9 @@ CONFIG += pedantic
|
||||||
# CONFIG += debug
|
# CONFIG += debug
|
||||||
# CONFIG += sanitize
|
# CONFIG += sanitize
|
||||||
|
|
||||||
|
CONFIG += pinyin
|
||||||
|
CONFIG += hunspell
|
||||||
|
|
||||||
MOC_DIR = moc
|
MOC_DIR = moc
|
||||||
OBJECTS_DIR = obj
|
OBJECTS_DIR = obj
|
||||||
RCC_DIR = rcc
|
RCC_DIR = rcc
|
||||||
|
|
|
@ -641,14 +641,14 @@ void QskVirtualKeyboard::createUI()
|
||||||
|
|
||||||
setAutoLayoutChildren( true );
|
setAutoLayoutChildren( true );
|
||||||
|
|
||||||
auto& panelKeyData = keyData();
|
auto outerBox = new QskLinearBox( Qt::Vertical, this );
|
||||||
|
|
||||||
QskLinearBox* outterBox = new QskLinearBox( Qt::Vertical, this );
|
m_data->candidateBox = new QskLinearBox( Qt::Horizontal, outerBox );
|
||||||
outterBox->setAutoAddChildren( true );
|
#if 1
|
||||||
|
// should be skin hints TODO ...
|
||||||
m_data->candidateBox = new QskLinearBox( Qt::Horizontal, outterBox );
|
|
||||||
QMarginsF margins( 0, 10, 0, 20 ); // ###
|
QMarginsF margins( 0, 10, 0, 20 ); // ###
|
||||||
m_data->candidateBox->setMargins( margins );
|
m_data->candidateBox->setMargins( margins );
|
||||||
|
#endif
|
||||||
|
|
||||||
// to determine suggestions buttons width
|
// to determine suggestions buttons width
|
||||||
// (otherwise empty buttons would be too small when there are only a few suggestions):
|
// (otherwise empty buttons would be too small when there are only a few suggestions):
|
||||||
|
@ -659,9 +659,12 @@ void QskVirtualKeyboard::createUI()
|
||||||
|
|
||||||
for( int a = 0; a < QskVirtualKeyboardCandidateButton::maxCandidates(); ++a )
|
for( int a = 0; a < QskVirtualKeyboardCandidateButton::maxCandidates(); ++a )
|
||||||
{
|
{
|
||||||
QskVirtualKeyboardCandidateButton* candidateButton = new QskVirtualKeyboardCandidateButton( this, m_data->candidateBox );
|
auto candidateButton = new QskVirtualKeyboardCandidateButton( this, m_data->candidateBox );
|
||||||
qreal height = candidateButton->sizeHint().height();
|
qreal height = candidateButton->sizeHint().height();
|
||||||
candidateButton->setPreferredHeight( height + 10 ); // ### propper padding by adding Panel subcontrol
|
#if 1
|
||||||
|
// should be done by margins/paddings
|
||||||
|
candidateButton->setPreferredHeight( height + 10 );
|
||||||
|
#endif
|
||||||
candidateButton->setPreferredWidth( candidateButtonWidth );
|
candidateButton->setPreferredWidth( candidateButtonWidth );
|
||||||
candidateButton->installEventFilter( this );
|
candidateButton->installEventFilter( this );
|
||||||
|
|
||||||
|
@ -670,13 +673,7 @@ void QskVirtualKeyboard::createUI()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_data->candidateBox->setVisible( m_data->candidateBoxVisible );
|
m_data->candidateBox->setVisible( m_data->candidateBoxVisible );
|
||||||
outterBox->setRetainSizeWhenHidden( m_data->candidateBox, true );
|
outerBox->setRetainSizeWhenHidden( m_data->candidateBox, true );
|
||||||
|
|
||||||
qreal candidatesHeight = m_data->candidateBox->sizeHint().height();
|
|
||||||
|
|
||||||
const auto contentsRect = layoutRect();
|
|
||||||
const qreal sx = contentsRect.size().width();
|
|
||||||
const qreal sy = contentsRect.size().height() - candidatesHeight;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskVirtualKeyboard::updateUI()
|
void QskVirtualKeyboard::updateUI()
|
||||||
|
|
Loading…
Reference in New Issue