QHBoxLayout layout1;
QVBoxLayout layout2;
layout2.addWidget(&passwordbox);
- layout2.addWidget(&save_password);
+ if(!m_host.isEmpty()) //don't save incomming connections
+ layout2.addWidget(&save_password);
layout1.addLayout(&layout2);
layout1.addWidget(&ok_button);
dialog.setLayout(&layout1);
if(dialog.exec()) { //dialog accepted
password = passwordbox.text();
- if(save_password.isChecked()) {
+ if(!m_host.isEmpty() and save_password.isChecked()) {
kDebug(5011) << "Saving password for host '" << m_host << "'";
settings.setValue(QString("%1/password").arg(m_host), password);
void VncView::outputErrorMessage(const QString &message)
{
- kDebug(5011) << message;
-
if (message == "INTERNAL:APPLE_VNC_COMPATIBILTY") {
setCursor(localDotCursor());
m_forceLocalCursor = true;
//to get at individual key presses, we split 'keys' into its components
QList<int> key_list;
- for(int i = 0; ; i++) {
- QString k = keys.toString().section('+', i, i);
+ int pos = 0;
+ while(true) {
+ QString k = keys.toString().section('+', pos, pos);
if(k.isEmpty())
break;
+
//kDebug(5011) << "found key: " << k;
if(k == "Alt") {
key_list.append(Qt::Key_Alt);
} else {
key_list.append(QKeySequence(k)[0]);
}
+
+ pos++;
}
for(int i = 0; i < key_list.count(); i++)