summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-10-22 06:06:15 (UTC)
committer llornkcor <llornkcor>2004-10-22 06:06:15 (UTC)
commit0ad51ab1359feaf04c3be229250a4e2e93892564 (patch) (unidiff)
tree4e5a55814f2ab401b4c54cb4bd7a47ee347bf4ee
parent84b7a20c67226aa4305ad0cb7c05e2507ca0cc0e (diff)
downloadopie-0ad51ab1359feaf04c3be229250a4e2e93892564.zip
opie-0ad51ab1359feaf04c3be229250a4e2e93892564.tar.gz
opie-0ad51ab1359feaf04c3be229250a4e2e93892564.tar.bz2
upon further investigation, QD does indeed do different stuff for different version strings.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/server.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp
index 0eaebcf..42186d3 100644
--- a/core/launcher/server.cpp
+++ b/core/launcher/server.cpp
@@ -374,40 +374,45 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data)
374 mkdir( "/tmp/rdiff" ); 374 mkdir( "/tmp/rdiff" );
375 QDir dir; 375 QDir dir;
376 dir.setPath( "/tmp/rdiff" ); 376 dir.setPath( "/tmp/rdiff" );
377 QStringList entries = dir.entryList(); 377 QStringList entries = dir.entryList();
378 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it ) 378 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
379 dir.remove( *it ); 379 dir.remove( *it );
380 } else if ( msg == "sendHandshakeInfo()" ) { 380 } else if ( msg == "sendHandshakeInfo()" ) {
381 QString home = getenv( "HOME" ); 381 QString home = getenv( "HOME" );
382#ifndef QT_NO_COP 382#ifndef QT_NO_COP
383 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" ); 383 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" );
384 e << home; 384 e << home;
385 int locked = (int) ServerApplication::screenLocked(); 385 int locked = (int) ServerApplication::screenLocked();
386 e << locked; 386 e << locked;
387#endif 387#endif
388 } else if ( msg == "sendVersionInfo()" ) { 388 } else if ( msg == "sendVersionInfo()" ) {
389 /* 389 /*
390 * QtopiaDesktop relies on the major number 390 * @&$*! Qtopiadesktop relies on the major number
391 * to start with 1. 391 * to start with 1. (or 2 as the case of version 2.1 will be)
392 * we need to fake at least 1.4 to be able 392 * we need to fake 1.7 to be able
393 * to sync with QtopiaDesktop1.6 393 * to sync with Qtopiadesktop 1.7.
394 * We'll send it Opie's version in the platform string for now,
395 * until such time when QD gets rewritten correctly.
394 */ 396 */
395 QCopEnvelope e( "QPE/Desktop", "versionInfo(QString,QString)" ); 397 QCopEnvelope e( "QPE/Desktop", "versionInfo(QString,QString)" );
396 QString opiename = "Opie"; 398
397 e << QString(QPE_VERSION) << opiename; 399 QString opiename = "Opie "+QString(QPE_VERSION);
400 QString QDVersion="1.7";
401 e << QDVersion << opiename;
402
398 } else if ( msg == "sendCardInfo()" ) { 403 } else if ( msg == "sendCardInfo()" ) {
399#ifndef QT_NO_COP 404#ifndef QT_NO_COP
400 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" ); 405 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" );
401#endif 406#endif
402 storage->update(); 407 storage->update();
403 const QList<FileSystem> &fs = storage->fileSystems(); 408 const QList<FileSystem> &fs = storage->fileSystems();
404 QListIterator<FileSystem> it ( fs ); 409 QListIterator<FileSystem> it ( fs );
405 QString s; 410 QString s;
406 QString homeDir = getenv("HOME"); 411 QString homeDir = getenv("HOME");
407 QString homeFs, homeFsPath; 412 QString homeFs, homeFsPath;
408 for ( ; it.current(); ++it ) { 413 for ( ; it.current(); ++it ) {
409 int k4 = (*it)->blockSize()/256; 414 int k4 = (*it)->blockSize()/256;
410 if ( (*it)->isRemovable() ) { 415 if ( (*it)->isRemovable() ) {
411 s += (*it)->name() + "=" + (*it)->path() + "/Documents " // No tr 416 s += (*it)->name() + "=" + (*it)->path() + "/Documents " // No tr
412 + QString::number( (*it)->availBlocks() * k4/4 ) 417 + QString::number( (*it)->availBlocks() * k4/4 )
413 + "K " + (*it)->options() + ";"; 418 + "K " + (*it)->options() + ";";