~ubuntu-branches/debian/sid/kdelibs/sid

« back to all changes in this revision

Viewing changes to kdecore/kstartupinfo.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-02-14 12:27:07 UTC
  • Revision ID: james.westby@ubuntu.com-20080214122707-en6weaf0kx0azg2p
Tags: upstream-3.5.9
ImportĀ upstreamĀ versionĀ 3.5.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
2
 
3
 
 $Id: kstartupinfo.cpp 700792 2007-08-16 12:57:23Z mueller $
 
3
 $Id: kstartupinfo.cpp 724473 2007-10-12 12:16:50Z lunakl $
4
4
 
5
5
 Copyright (C) 2001-2003 Lubos Lunak        <l.lunak@kde.org>
6
6
 
545
545
 
546
546
void KStartupInfo::setNewStartupId( QWidget* window, const QCString& startup_id )
547
547
    {
548
 
    long activate = true;
 
548
    bool activate = true;
549
549
    kapp->setStartupId( startup_id );
550
550
    if( window != NULL )
551
551
        {
937
937
#ifdef Q_WS_X11
938
938
    extern Time qt_x_user_time;
939
939
#else
940
 
    long qt_x_user_time = 0;
 
940
    unsigned long qt_x_user_time = 0;
941
941
#endif
942
942
    QCString id = QString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec )
943
943
        .arg( tm.tv_usec ).arg( getpid()).arg( qt_x_user_time ).utf8();
1078
1078
    if( pos >= 0 )
1079
1079
        {
1080
1080
        bool ok;
1081
 
        long time = d->id.mid( pos + 5 ).toLong( &ok );
 
1081
        unsigned long time = d->id.mid( pos + 5 ).toULong( &ok );
 
1082
        if( !ok && d->id[ pos + 5 ] == '-' ) // try if it's as a negative signed number perhaps
 
1083
            time = d->id.mid( pos + 5 ).toLong( &ok );
1082
1084
        if( ok )
1083
1085
            return time;
1084
1086
        }
1093
1095
        if( pos2 >= 0 )
1094
1096
            {
1095
1097
            bool ok;
1096
 
            long time = d->id.mid( pos2 + 1, pos1 - pos2 - 1 ).toLong( &ok );
 
1098
            unsigned long time = d->id.mid( pos2 + 1, pos1 - pos2 - 1 ).toULong( &ok );
 
1099
            if( !ok && d->id[ pos2 + 1 ] == '-' ) // try if it's as a negative signed number perhaps
 
1100
                time = d->id.mid( pos2 + 1, pos1 - pos2 - 1 ).toLong( &ok );
1097
1101
            if( ok )
1098
1102
                return time;
1099
1103
            }