Re: [Interest] QTimer and QThread

2013-07-31 Thread Mandeep Sandhu
1) From QTimer documentation: > *Qt uses the timer's **thread > affinity > ** to determine which thread will emit the > **timeout() > **signal. Because of this, you must start and stop t

Re: [Interest] Certain QTextCodecs causing crashes on Linux

2013-07-31 Thread Thiago Macieira
On quarta-feira, 31 de julho de 2013 19:39:28, Scott Aron Bloom wrote: > QTextCodec * codec = QTextCodec::codecForName( "UTF-8" ); > QString a = codec->toUnicode( "a" ); > If ( a.isEmpty() ) > // don't Show > QChar aChar = tmp.at( 0 ); > If ( aChar.unicode() != 'a' ) > // don't show

Re: [Interest] Certain QTextCodecs causing crashes on Linux

2013-07-31 Thread Thiago Macieira
On quarta-feira, 31 de julho de 2013 19:24:28, Scott Aron Bloom wrote: > QByteArray data = fi.readLine() > QString contents = QString::fromLocal8Bit( currData ) > setPlainText( contents ) > > Would the other setCodec functions be better ? You shouldn't set any codec for the above. It's working al

Re: [Interest] Certain QTextCodecs causing crashes on Linux

2013-07-31 Thread Thiago Macieira
On quarta-feira, 31 de julho de 2013 20:04:33, Richard Moore wrote: > On 31 July 2013 19:54, Thiago Macieira wrote: > > On quarta-feira, 31 de julho de 2013 18:21:42, Scott Aron Bloom wrote: > >> As to the size of the codec.. Is there a way to tell the size? > > > > Hmm... You can feed it an 'a' a

Re: [Interest] Qt4 QODBCDriver class and header file no longer in Qt5?

2013-07-31 Thread Thiago Macieira
On quinta-feira, 1 de agosto de 2013 00:00:54, Constantin Makshin wrote: > While class names and #include-s are certainly safer because they are > checked at compile-time, but text names unleash the real power of QtSql > — unified API (which, IMHO, doesn't make much sense if you stick your > applic

Re: [Interest] Qt4 QODBCDriver class and header file no longer in Qt5?

2013-07-31 Thread Scott Aron Bloom
Frankly... I would extend his concern to CSS/StyleSheets/QML etc etc.. That more and more of software development is going to "code it and pray it works when you test it while also praying you exercise the text at runtime" worries me as well :) Scott -Original Message- From: interest-b

Re: [Interest] Qt4 QODBCDriver class and header file no longer in Qt5?

2013-07-31 Thread Constantin Makshin
While class names and #include-s are certainly safer because they are checked at compile-time, but text names unleash the real power of QtSql — unified API (which, IMHO, doesn't make much sense if you stick your application to one particular RDBMS) and ability to make the database interface selecta

Re: [Interest] Certain QTextCodecs causing crashes on Linux

2013-07-31 Thread Thiago Macieira
On quarta-feira, 31 de julho de 2013 18:21:42, Scott Aron Bloom wrote: > As to the size of the codec.. Is there a way to tell the size? Hmm... You can feed it an 'a' and see how many bytes come out. Actually, verify that the output is exactly one byte 0x61. That way, you'll also prevent someone

Re: [Interest] Certain QTextCodecs causing crashes on Linux

2013-07-31 Thread Scott Aron Bloom
No.. Centos, this happens on the 5.8 and 6.4 releases Ill look into the patch.. Thanks. Scott From: interest-bounces+scott=onshorecs@qt-project.org [mailto:interest-bounces+scott=onshorecs@qt-project.org] On Behalf Of Karl Ruetz Sent: Wednesday, July 31, 2013 9:56 AM To: interest@qt-pro

Re: [Interest] Certain QTextCodecs causing crashes on Linux

2013-07-31 Thread Thiago Macieira
On quarta-feira, 31 de julho de 2013 16:44:10, Scott Aron Bloom wrote: > 20 QTextCodec::setCodecForLocale( codec ); > 21 QMessageBox::warning( NULL, argv[ 0 ], codecName ); > 22 return 0; > 23 } > > When called with UTF-32 I get the following crash: > [scott@localhost build]$ ./CodecT

Re: [Interest] QTimer and QThread

2013-07-31 Thread Dmitry Kozlov
On 31.07.2013 17:01, Alexander Syvak wrote: Here's the snippet below from implementation of the run method. The class inherits a class inheriting QThread. ... screenshot_qtmr=newQTimer;//(this); screenshot_qtmr->moveToThread(this); qDebug() << connect(screenshot_qtmr, SIGNAL(timeout

Re: [Interest] Qt4 QODBCDriver class and header file no longer in Qt5?

2013-07-31 Thread Thiago Macieira
On quarta-feira, 31 de julho de 2013 16:53:46, Niels Dekker wrote: > On 2013-07-31 16:24, Sergio Ahumada wrote: > > I think those headers were made private in Qt 5.1 (they were > > public by mistake). > > Anyways, what if you do something like: > > QSqlDatabase db = QSqlDatabase::addDatabase("QODBC

Re: [Interest] Certain QTextCodecs causing crashes on Linux

2013-07-31 Thread Karl Ruetz
Are you using Ubuntu by any chance? We had a similar problem last year but it was unrelated to Qt. If you tried to do several consecutive searches in a web browser on Ubuntu using the French language, this exact error would get sent to standard error and the browser would crash. Applying this

[Interest] Certain QTextCodecs causing crashes on Linux

2013-07-31 Thread Scott Aron Bloom
Ran into a weird situation.. I have to allow my customer to set the System Codec so when they load a file, it loads correctly. However, in QA'ing the code, certain Text Codecs are causing a crash in QMessageBox (and presumably other widgets). 6 int main( int argc, char ** argv ) 7 { 8

Re: [Interest] Qt4 QODBCDriver class and header file no longer in Qt5?

2013-07-31 Thread Karl Ruetz
The binary installer does not automatically build or install the database plugins. You either have to install Qt from source and specify -qt-sql-odbc (built in) or -plugin-sql-odbc (plugin) to the configure command OR you have to build the plugin manually after installing. Instructions are here:

Re: [Interest] QTimer and QThread

2013-07-31 Thread Mandeep Sandhu
On Wed, Jul 31, 2013 at 2:31 PM, Alexander Syvak wrote: > Here's the snippet below from implementation of the run method. The class > inherits a class inheriting QThread. > ... >screenshot_qtmr = new QTimer;//(this); > > screenshot_qtmr->moveToThread(this); > > This stmt is not necessa

Re: [Interest] QTimer and QThread

2013-07-31 Thread Tomasz Olszak
2013/7/31 Alexander Syvak > Here's the snippet below from implementation of the run method. The class > inherits a class inheriting QThread. > ... >screenshot_qtmr = new QTimer;//(this); > > screenshot_qtmr->moveToThread(this); > > qDebug() << connect(screenshot_qtmr, SIGNAL(timeo

[Interest] QTimer and QThread

2013-07-31 Thread Alexander Syvak
Here's the snippet below from implementation of the run method. The class inherits a class inheriting QThread. ... screenshot_qtmr = new QTimer;//(this); screenshot_qtmr->moveToThread(this); qDebug() << connect(screenshot_qtmr, SIGNAL(timeout()), this, SLOT(on_screenshot_timeout())