summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console
authorhash <hash>2002-10-24 16:24:00 (UTC)
committer hash <hash>2002-10-24 16:24:00 (UTC)
commitf8875264ece878f5bb7e8e528200f6ba437138c5 (patch) (side-by-side diff)
tree343ef25aae76316e4931f15b63938388ff0d5dd8 /noncore/apps/opie-console
parent07811d76c261ece00a45589a2eb9d2bb8971943e (diff)
downloadopie-f8875264ece878f5bb7e8e528200f6ba437138c5.zip
opie-f8875264ece878f5bb7e8e528200f6ba437138c5.tar.gz
opie-f8875264ece878f5bb7e8e528200f6ba437138c5.tar.bz2
got rid of those warnings
Diffstat (limited to 'noncore/apps/opie-console') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/function_keyboard.cpp4
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp
index fa11701..3da8d61 100644
--- a/noncore/apps/opie-console/function_keyboard.cpp
+++ b/noncore/apps/opie-console/function_keyboard.cpp
@@ -97,13 +97,13 @@ void FunctionKeyboard::paintEvent(QPaintEvent *e) {
keyWidth, keyHeight,
Qt::AlignHCenter | Qt::AlignVCenter,
keys[handle].label
);
else {
- ushort centerX = c *keyWidth + (keyWidth - keys[handle].pix->width()) / 2;
+ ushort centerX = (ushort)(c *keyWidth) + (ushort)(keyWidth - keys[handle].pix->width()) / 2;
ushort centerY = r * keyHeight + (keyHeight - keys[handle].pix->height()) / 2;
p.drawPixmap(centerX, centerY, *keys[handle].pix);
}
}
}
}
@@ -124,13 +124,13 @@ void FunctionKeyboard::paintKey(uint row, uint col) {
keyWidth, keyHeight,
Qt::AlignHCenter | Qt::AlignVCenter,
keys[handle].label
);
else {
- ushort centerX = col *keyWidth + (keyWidth - keys[handle].pix->width()) / 2;
+ ushort centerX = (ushort)(col *keyWidth) + (ushort)(keyWidth - keys[handle].pix->width()) / 2;
ushort centerY = row * keyHeight + (keyHeight - keys[handle].pix->height()) / 2;
p.drawPixmap(centerX, centerY, *keys[handle].pix);
}
if (col == numCols - 1) {
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 406586c..b177fa5 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -558,13 +558,13 @@ void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) {
if (pressed) state = QEvent::KeyPress;
else state = QEvent::KeyRelease;
QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode)));
- // where should i send this event? doesnt work sending it here
+ // is this the best way to do this? cant figure out any other way to work
QApplication::sendEvent((QObject *)m_curSession->widget(), &ke);
ke.ignore();
}
}
void MainWindow::slotCopy() {
if (!currentSession() ) return;