Re: [Development] Mutex future directions

2012-05-23 Thread Carsten Breuer
Hi Bradley,

 And I don't think they very much liked the idea of spinning while trying to 
 acquire a lock (consumes power)... at least we have a call to 
 QThread::yieldCurrentThread(), though it would be interesting to see what 
 happens if we replace it with a PAUSE instruction.
 Have you seen the spin code in 4.8? It does use 
 QThread::yieldCurrentThread(). ;)

I guess it depends a bit on if you want to yield to another thread or
not ;-). Of course: burning cpu time is another way to solve this ;-)

Greetings,


Carsten

 
 --
 Bradley T. Hughes
 bradley.hug...@nokia.com
 
 ___
 Development mailing list
 Development@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Mutex future directions

2012-05-23 Thread Carsten Breuer
Hi Thiago,

thanks for clearing this :-)

 I guess it depends a bit on if you want to yield to another thread or
 not ;-). Of course: burning cpu time is another way to solve this ;-)
 
 According to the Intel manual, if you *don't* yield and you don't have the 
 PAUSE instruction, you may make things worse. 

What do you exactly mean with a PAUSE instruction. Is this a assembler
processor command?

 For one thing, if you don't yield, the processor will continue executing your 
 code, without giving a chance for other processes to run. There's no 
 guarantee 
 even in a multiprocessor system that the other thread is running. And even if 
 it's running, if it was scheduled to another thread on the same hyperthreaded 
 core, the processor may not execute the that thread because this thread still 
 has instructions to execute.

Interesting. Wouldn't it be better to change YieldCurrentThread?
I guess, most of us are not aware of this and some of us
learned in the 386 century that give back CPU performance to the OS is
always a good thing. I guess it is even nowadays a good thing on single
core machines. Isn't it?

Thanks and Best Regards,



Carsten
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Hiding Tabs in QTabWidget

2012-03-29 Thread Carsten Breuer
Hi Jordi,



thanks for the answer. Im looking forward to see
you changes in QT 5.1 :-).


Best Regards,



Carsten


Am 27.03.2012 07:51, schrieb Jordi Pujol:
 Sorry, answer sent only to Carsten ( my mistake... )
 
 Afaik you only have the option to remove the tab . I've implemented
 that functionality, but right now I cannot contribute it to Gerrit
 ( no maintainer for QWidgets module  no plans... ).

 If someone can tell me how to do it I'll be glad to do it for
 Qt5.1 

 El 26/03/2012 21:43, Carsten Breuer carstenbreue...@textwork.de
 escribió:
 Hi guys,
 
 
 i just spend some hours with trying to hide a tab in a
 QTabWidget
 that was designed with QtCreator (ui).
 After searching the web it seems to me that the only way to
 solve this
 is to use the removeTab function.
 
 I don't want to use removeTab, because this means that i have
 to save
 the tab text somewherem, have to deal with translations and
 with tab
 position dependencies and much more. All stuff, that smart Qt
 should do
 for me.
 
 Is there any other function that i can use to hide tabs?
 Someone...please :-)
 
 
 Best Regards,
 
 
 
 Carsten
 ___
 Development mailing list
 Development@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development
 
 
 ___
 Development mailing list
 Development@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] Hiding Tabs in QTabWidget

2012-03-26 Thread Carsten Breuer
Hi guys,


i just spend some hours with trying to hide a tab in a QTabWidget
that was designed with QtCreator (ui).
After searching the web it seems to me that the only way to solve this
is to use the removeTab function.

I don't want to use removeTab, because this means that i have to save
the tab text somewherem, have to deal with translations and with tab
position dependencies and much more. All stuff, that smart Qt should do
for me.

Is there any other function that i can use to hide tabs?
Someone...please :-)


Best Regards,



Carsten
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development