Re: [Interest] Fwd: How to shutdown Qt app on Android.

2015-01-27 Thread Pau Garcia i Quiles
On Tue, Jan 27, 2015 at 11:38 AM, Igor Mironchik igor.mironc...@gmail.com wrote: I have tested QApplication::quit() in QCoreApplication::applicationStateChanged( Qt::ApplicationSuspended ). And yes, the app is still in the list, but when I launch the app again it starts from the same

Re: [Interest] QML Preview

2015-01-27 Thread Rutledge Shawn
Is there any way to have the external tool QML Preview take on a different screen size? I guess you're talking about qmlscene (the tool for Qt Quick 2): There's AFAIK no way to force a specific size from the command line, but you can play with the options --maximized --fullscreen

Re: [Interest] why does Qt prefer to return QList over QVector?

2015-01-27 Thread Mark Gaiser
On Tue, Jan 27, 2015 at 8:56 AM, Felix morack felixo...@gmail.com wrote: hello, i recently gained a small, but considerable performance boost by switching out QList for QVector in some legacy code. This is hindered by the fact that Qt itself often returns QList, eg with QMap::values().

Re: [Interest] QBuffer::seek warnings in QtConcurrent

2015-01-27 Thread Thiago Macieira
On Tuesday 27 January 2015 15:32:26 Igor Mironchik wrote: 2 QBuffer::seek qbuffer.cpp 374 0x5807b386 3 QDataStream::skipRawDataqdatastream.cpp 11690x5807dfbc 4 getExifOrientation qjpeghandler.cpp820 0x5ab66204 The source

Re: [Interest] GStreamer missing plugin error

2015-01-27 Thread Thiago Macieira
On Tuesday 27 January 2015 17:49:50 Harri Pasanen wrote: I wonder if there are plans to migrate to GStreamer 1.0? That is more than two years old, and 0.10 is about ten years old. Ubuntu seems to have switched in 14.04-14.10, I don't know about other dists. There are, but the work isn't

Re: [Interest] GStreamer missing plugin error

2015-01-27 Thread Harri Pasanen
I seem to have mp4 playback working on OS X out of the box, but my video did not have any sound track. I have not knowingly installed any gstreamer plugins in the machine. I made a small testcase included in https://bugreports.qt.io/browse/QTBUG-44157 that plays the included mp4 fine on OSX.

Re: [Interest] QBuffer::seek warnings in QtConcurrent

2015-01-27 Thread Igor Mironchik
On Tue, 27 Jan 2015 22:18:23 +0300, Igor Mironchik igor.mironc...@gmail.com wrote: Hi. On Tue, 27 Jan 2015 21:13:55 +0300, Thiago Macieira thiago.macie...@intel.com wrote: On Tuesday 27 January 2015 15:32:26 Igor Mironchik wrote: 2 QBuffer::seek qbuffer.cpp 374

Re: [Interest] QtConcurrent and event-driven objects

2015-01-27 Thread Dmitriy Purgin
Hello, thanks for answering. Sorry, I might have described it not clear enough. Tasks that utilize timers and sockets are actually quite separate tasks. I used the code posted just to show the execution context. I'll start with tasks using timers. These are executed once in a minute to do some

Re: [Interest] How to shutdown Qt app on Android.

2015-01-27 Thread Igor Mironchik
Hi. On Tue, 27 Jan 2015 12:53:03 +0300, Harri Pasanen ha...@mpaja.com wrote: Why do you care? If I'm correct, it is a list of most recently used apps, not necessarily active apps. At least on iOS it is that way. On iOS what you see on the list is just a screenshot. I suspect on Android

Re: [Interest] why does Qt prefer to return QList over QVector?

2015-01-27 Thread Frédéric Marchal
On Tuesday 27 January 2015 10:34:57, Giuseppe D'Angelo wrote : Il 27/01/2015 09:41, Mark Gaiser ha scritto: A somewhat related question, why is there no QList::reserve()? There is, what's missing is resize(). (Fundamentally that shared part behind QList has no code dealing with shrinking.)

Re: [Interest] why does Qt prefer to return QList over QVector?

2015-01-27 Thread Daniel França
is QVector faster even for sequential access? On Tue 27 Jan 2015 at 09:42 Mark Gaiser mark...@gmail.com wrote: On Tue, Jan 27, 2015 at 8:56 AM, Felix morack felixo...@gmail.com wrote: hello, i recently gained a small, but considerable performance boost by switching out QList for QVector in

Re: [Interest] Storage path on Android

2015-01-27 Thread Igor Mironchik
Thank you, QStorageInfo is working. Tested on real Android v 4.0.3. On Tue, 27 Jan 2015 05:04:02 +0300, Ruslan Moukhlynin rus...@khvmntk.ru wrote: The default storage path you cat get with QStandardPaths::​writableLocation(QStandardPaths::AppDataLocation) For list of mounted drives see

Re: [Interest] How to shutdown Qt app on Android.

2015-01-27 Thread Igor Mironchik
This approach doesn't work on Android. Application still in the list of inactive applications. On Mon, 26 Jan 2015 12:02:27 +0300, Nuno Santos nunosan...@imaginando.pt wrote: Igor, I think you could listen to application state changed signal on the app entity and when you receive a

Re: [Interest] why does Qt prefer to return QList over QVector?

2015-01-27 Thread Felix morack
yes, in fact especially then, probably due to caching. 2015-01-27 9:47 GMT+01:00 Daniel França daniel.fra...@gmail.com: is QVector faster even for sequential access? On Tue 27 Jan 2015 at 09:42 Mark Gaiser mark...@gmail.com wrote: On Tue, Jan 27, 2015 at 8:56 AM, Felix morack

Re: [Interest] why does Qt prefer to return QList over QVector?

2015-01-27 Thread Giuseppe D'Angelo
Il 27/01/2015 09:41, Mark Gaiser ha scritto: As far as i know this is for historic reasons. QList used to be faster then QVector (someone, please correct me if i'm wrong) in the old days, but nowadays (Qt5 era) they prefer QVector over QList. It is as fast or faster then QList in nearly every

Re: [Interest] How to shutdown Qt app on Android.

2015-01-27 Thread Harri Pasanen
Why do you care? If I'm correct, it is a list of most recently used apps, not necessarily active apps. At least on iOS it is that way. On iOS what you see on the list is just a screenshot. I suspect on Android it is the same if you have done Qt.quit(). Just my 2 cents, Harri On

Re: [Interest] QtConcurrent and event-driven objects

2015-01-27 Thread Bo Thorsen
On 01/26/2015 11:56 AM, Dmitriy Purgin wrote: Hi, I'm using Qt to power an application server with multithreaded TCP listener and maintenence tasks running in separate threads. The TCP listener runs in main thread and spawns a separate thread to handle socket operation. The socket is being

Re: [Interest] QtConcurrent and event-driven objects

2015-01-27 Thread Bo Thorsen
On 01/26/2015 11:56 AM, Dmitriy Purgin wrote: Another important thing for me is network. The docs also specify that the network module should also follow single thread policy. Does that mean that an instance of QTcpSocket can't be used in QRunnable started by QThreadPool? You can only use the

Re: [Interest] QBuffer::seek warnings in QtConcurrent

2015-01-27 Thread Giuseppe D'Angelo
Il 27/01/2015 20:27, Igor Mironchik ha scritto: I've looked at qjpeghandler.cpp and it is strangely that practically all of my photos produced by my Android camera is corrupted. Do you know any software that can give me information about exif in jpeg that I can be sure that jpeg is corrupted?

Re: [Interest] building only a platform plugin?

2015-01-27 Thread René J . V . Bertin
On Tuesday January 27 2015 11:43:40 René J.V. Bertin wrote: FWIW: after building qtbase with xcb support and installing just the additional files listed in my previous email, I then proceeded to snip A few observations: Here's a screenshot of Qt's own Assistant, displaying through my X

Re: [Interest] Custom QQuickItem with smooth painting

2015-01-27 Thread Ruslan Moukhlynin
Thanks for the answer! In my case setting samples makes the output even worse then without setting it. I've tried 16 and 255, nothing works. Setting format.setSamples() removes any antialiasing at all. Without format.setSamples() - http://pbrd.co/1EO9GRh With format.setSamples() -

Re: [Interest] QBuffer::seek warnings in QtConcurrent

2015-01-27 Thread Igor Mironchik
Hi. On Tue, 27 Jan 2015 21:13:55 +0300, Thiago Macieira thiago.macie...@intel.com wrote: On Tuesday 27 January 2015 15:32:26 Igor Mironchik wrote: 2 QBuffer::seek qbuffer.cpp 374 0x5807b386 3 QDataStream::skipRawDataqdatastream.cpp 1169 0x5807dfbc 4

[Interest] QML Drag: Create a shapshot of the dragged item

2015-01-27 Thread Carollo, Benedetto
Hi there, I don't know if I have found a bug or of the behaviour is the indented one. Basically I'm trying to create a snapshot of a dragged item in QML. I'm using Qt 5.4 but unfortunately when the qml object is hosted in a qquickwidget the qml method grabToImage doesn't work and on the console

[Interest] [QML] Disallow lowercase import qualifier ids

2015-01-27 Thread Konstantin Podsvirov
Hi all! qt/declarative/src/qml/compiler/qqmlcodegenerator.cpp line ~356 QString qualifier = node-importId.toString(); if (!qualifier.at(0).isUpper()) { QQmlError error; error.setDescription(QCoreApplication::translate(QQmlParser,Invalid import qualifier

[Interest] GStreamer missing plugin error

2015-01-27 Thread Harri Pasanen
Does Qt have all the plugins required for MediaPlayer to play video, in my case xvid in mp4 container, or does it rely on the host having required codecs etc? The reason I ask, is that I'm on a new linux installation (Kubuntu 14.10 amd64) and the video doesn't play any more. Instead I'm

[Interest] QBuffer::seek warnings in QtConcurrent

2015-01-27 Thread Igor Mironchik
Hi. I found that next code: //! Load images future watcher. QFutureWatcher QImage * futureWatcher; //! Current index for loading image. int currentLoadImageIndex; //! Future. QFuture QImage future; QImage loadImage( const QString fileName, const QSize maxSize ) { QImage image(

Re: [Interest] GStreamer missing plugin error

2015-01-27 Thread Thiago Macieira
On Tuesday 27 January 2015 11:30:54 Harri Pasanen wrote: Does Qt have all the plugins required for MediaPlayer to play video, in my case xvid in mp4 container, or does it rely on the host having required codecs etc? The host has to provide them. Qt supplies nothing of the sort. Yet when I

Re: [Interest] How to shutdown Qt app on Android.

2015-01-27 Thread Robert Iakobashvili
Dear Igor, 1. Arrange forceClosingMyApp in your derived activity: package com.myComp.MyProduct.activity; import java.lang.String; import android.os.Bundle; import android.util.Log; import android.content.Intent; import android.app.Activity; import android.view.KeyEvent; import

[Interest] Fwd: How to shutdown Qt app on Android.

2015-01-27 Thread Robert Iakobashvili
Dear Igor, 1. Arrange forceClosingMyApp in your derived activity: package com.myComp.MyProduct.activity; import java.lang.String; import android.os.Bundle; import android.util.Log; import android.content.Intent; import android.app.Activity; import android.view.KeyEvent; import

Re: [Interest] why does Qt prefer to return QList over QVector?

2015-01-27 Thread Thiago Macieira
On Tuesday 27 January 2015 10:34:57 Giuseppe D'Angelo wrote: I don't think it has ever been faster. The main reason behind QList is to generate less code: all the handling of the backing array is shared amongst the specializations. But please refer to Marc Mutz's awesome blog posts for more

Re: [Interest] Fwd: How to shutdown Qt app on Android.

2015-01-27 Thread Igor Mironchik
Thank you for your suggestion. I have tested QApplication::quit() in QCoreApplication::applicationStateChanged( Qt::ApplicationSuspended ). And yes, the app is still in the list, but when I launch the app again it starts from the same beginning, not resumed... Seems that approach with

Re: [Interest] QBuffer::seek warnings in QtConcurrent

2015-01-27 Thread Thiago Macieira
On Tuesday 27 January 2015 14:32:35 Igor Mironchik wrote: P.S. I don't use QBuffer anywhere in the application. This warnings is Qt internal warnings... Can you run with QT_FATAL_WARNINGS=1 and post a backtrace? -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel

Re: [Interest] Custom QQuickItem with smooth painting

2015-01-27 Thread Gunnar Sletta
Which platform / hardware is this? If you run your code with QSG_INFO=1 in the environment, does it report how many samples it finds? (16 is usually the absolute max on desktop hardware, 8 on some. 4 is usually the cap on embedded). If the hardware or GL stack doesn’t support multisampling, it

Re: [Interest] QBuffer::seek warnings in QtConcurrent

2015-01-27 Thread Constantin Makshin
Nice finding, Guiseppe. :) You're right that this may be unrelated to Igor's problem, but lines 811–813 look like a nice bait for JPEG images with malformed EXIF header[s] — values less than 8 will wrap around zero, leading to an attempt to skip unknown amount of data (QDataStream::skipRawData()

Re: [Interest] GStreamer missing plugin error

2015-01-27 Thread Harri Pasanen
I wonder if there are plans to migrate to GStreamer 1.0? That is more than two years old, and 0.10 is about ten years old. Ubuntu seems to have switched in 14.04-14.10, I don't know about other dists. Btw. on OSX, I got mp4 playback out of the box when running in iOS simulator, did not try

Re: [Interest] QBuffer::seek warnings in QtConcurrent

2015-01-27 Thread Igor Mironchik
0 qt_message_fatalqlogging.cpp14070x57ed3f21 1 QMessageLogger::warning qlogging.cpp396 0x57ed28bb 2 QBuffer::seek qbuffer.cpp 374 0x5807b386 3 QDataStream::skipRawDataqdatastream.cpp 11690x5807dfbc 4

Re: [Interest] Building Qt5 with Intel C++ under Windows

2015-01-27 Thread Saether Jan-Arve
FYI, I did some experiments here, and as I suspected, none of the *_p.c files have to be compiled in and can thus be removed. If these files caused a problem for you, just remove them from the list of SOURCES in iaccessible2.pri. FYI, I have prepared a patch here that removes the uneeded files.

[Interest] QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) on OSX

2015-01-27 Thread Harri Pasanen
returns /Library/Application Support/appname which is not user writable. Seems like a bug, but perhaps this is intentional? Harri ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest

Re: [Interest] Handling various displays on mobile...

2015-01-27 Thread Alejandro Exojo
El Tuesday 27 January 2015, Jason H escribió: I've spec'd the text my QML ui in points, and that works well. But the problem comes when i calculate padding and offsets in pixels. It looks great on my device (Note 2) but on newer devices with higher DPIs, the UI looks un-padded. I need a way