mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
generic: do not create temporary QString objects for conversion to integer
QByteArray::toLong() does the same as QString::toLong() except faster Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
db6643a680
commit
f65e97a948
2 changed files with 3 additions and 3 deletions
|
@ -178,8 +178,8 @@ int main(int argc, char ** argv)
|
|||
|
||||
FileTypeDialog dlg( mimeTypeData );
|
||||
if( args->isSet( "parent" )) {
|
||||
bool ok;
|
||||
long id = QString(args->getOption("parent")).toLong(&ok);
|
||||
bool ok = false;
|
||||
long id = args->getOption("parent").toLong(&ok);
|
||||
if (ok)
|
||||
KWindowSystem::setMainWindow( &dlg, (WId)id );
|
||||
}
|
||||
|
|
|
@ -1690,7 +1690,7 @@ namespace Oxygen
|
|||
|
||||
if( widget() != event->source() ) setForceActive( true );
|
||||
|
||||
const long source = QString( groupData->data( tabDragMimeType() ) ).toLong();
|
||||
const long source = groupData->data( tabDragMimeType() ).toLong();
|
||||
const int clickedIndex( tabIndexAt( point, true ) );
|
||||
if( clickedIndex < 0 ) tab_A_behind_B( source, tabId(_itemData.count()-1) );
|
||||
else tab_A_before_B( source, tabId(clickedIndex) );
|
||||
|
|
Loading…
Add table
Reference in a new issue