Re: [Development] On deprecated APIs

2016-09-01 Thread Diego Iastrubni
Maybe the wording is wrong... how about "not recommended" instead of
"deprecated"?

I would also like to have an option to be able to compile a "qforeach"
block without the compiler spitting at me (/me takes off the java developer
hat).

On Wed, Aug 31, 2016 at 12:27 PM, Ulf Hermann  wrote:

>
> This is a debate convenience vs performance;
>>
>> * Q_FOREACH will never detach, hence it is convenient.
>> * A for-loop can be (a very little more) optimized, as long as you work
>> on const containers or use qAsCont (and many will forget about that...
>> which
>> is *not* convenient)
>>
>
> ... especially as there is no qAsConst() for containers returned from
> functions. Those have to be saved in a local variable first, which makes
> the code not only less convenient but also uglier.
>
> I understand that we should teach people to avoid premature pessimzation,
> but at some point the pessimization might not actually be premature
> anymore. Q_FOREACH always makes a copy. This means you cannot mess up the
> logic if you change the code to modify the container in the loop body. You
> might actively decide to take a small performance hit for the convenience
> of not having to take care of this every time you change a loop body.
>
> The rules on when a Q_FOREACH detaches an implicitly shared container are
> also comparably simple. If you take a non-const reference as "iterator",
> then it detaches. If the reference is const or if you iterate by value, it
> won't detach. The rules in the "ranged for" case are more complicated and
> the user might actively trade a small performance hit for the ability to
> see the detaching behavior on first glance.
>
> Those are valid tradeoffs to be considered by the users and we should not
> impose either solution on them. So, I think there is still a place for
> Q_FOREACH in user code and we should not deprecate it in the first place. I
> agree that it's a good idea not to use it in Qt code.
>
> regards,
> Ulf
>
> ___
> 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] [Qt Installer] QtCreator as optional option

2015-07-06 Thread Diego Iastrubni
You should be able to install several Qt versions from the same SDK. What
are you installing different Qt SDKs into different paths?

(unless I miss-understood what you wrote)

On Mon, Jul 6, 2015 at 12:10 PM, Denis Shienkov 
wrote:

> Hi all..
>
> Please make the QtCreator as optional option in the Qt SDK installer.
>
> Because if I (as the user) have a lot versions of Qt SDK installed, then I
> have a lot of QtCreator instances too, that occupies a disk space, and do
> not like to me.
>
> BR,
> Denis
>
>
>
>
>
> ___
> 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] One 'qt' branch to rule 'em all!

2014-04-01 Thread Diego Iastrubni
I agree.

As we move to  a more linear development cycle, we can finally drop
git and update to svn, "where we are going we don't need branches"
anyway.

On Tue, Apr 1, 2014 at 2:12 PM, Koehne Kai  wrote:
> Hi,
>
> We've had now different setups with git branches - in Qt 4 we followed a 
> scheme with one master branch, which gets forked into minor version branches 
> (e.g. 4.8), which gets forked into patch branches (e.g. 4.8.1) ... in Qt 5 we 
> adopted a model where we had only three branches: dev, stable, release. This 
> was aiming to make it easy for people to participate and submit patches, 
> without having to worry too much about what's right now the 'right' branch to 
> submit. Anyhow, as discussed on this mailing list in length the current model 
> makes the release process unnecessarily hard ...
>
> I had a discussion with this with a couple of people, including Lars. In the 
> end we realized that both models are too complicated, and we should rather 
> have only one branch. Reality shows that we're working pretty sequential, 
> anyway: Everyone should concentrate right now on Qt 5.3.0, and afterwards on 
> Qt 5.3.1. When Qt 5.3.1 is out we can then decide whether we want to go for 
> Qt 5.3.2, or for Qt 5.4.0 ... It's up to you of course to prepare patches for 
> the next version locally (it's git!), but they should be only submitted when 
> the next version is being created.
>
> Benefits of this approach:
> - even less ambiguity about where to put patches
> - no need to fork branches
> - no need to merge branches
> - we encourage focus on the next release
> - less variants to be tested in CI
>
> So, here is what we will do:
> - create one branch named 'qt' out of current stable
> - block any other branches in gerrit
> - move on with this branch, and announce the current status of it (open for 
> features, feature freeze, hardening...) on the mailing list
>
> In addition there seems to be a lot of people that want to move back to one 
> git repository for all of Qt, too. Though this can wait until 5.3.0 is out...
>
> If there are no fundamental objections I'd like to see this into action as 
> early as possible, to not risk the 5.3.0 release (i.e. next week Thursday, 
> when we originally planned to merge to release branch).
>
> Kai
> ___
> 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] Compilation time very slow

2013-10-24 Thread Diego Iastrubni
On Wed, Oct 23, 2013 at 7:04 PM, Thiago Macieira
wrote:

> 3) Don't use Windows (the operating system and filesystems are too slow)
>  3.b) don't use MinGW (it uses sub-processes a lot, which are slow on
> Windows)
>


LOL...

But seriously - how about pre-compiled headers? Is anyone using this
compiler feature? Does it really help?
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Webkit for Android

2013-05-29 Thread Diego Iastrubni
On Thu, May 23, 2013 at 2:11 PM, Simon Hausmann wrote:

> That said, on Android it might make sense to differentiate between having
> access to QtWebKit and being able to embed web content. Perhaps the latter
> can
> be done with less effort if there was a way of wrapping the Java WebView
> in Qt
> and embedding that into QML2.
>

Just displaying new content is not good enough. I am not interested in
starting a new activity to surf to a web page.

I want an HTML page with HTML -> C++ (or... Qt's JS) and from my
application code to call the JS on the page. I want my application to
interact with the web page.

I like Mark's idea about disconnecting between the HTML engine and Qt -
using the system HTML engine, and not embedding our own. I have no idea how
to implement this, as I am not sure how deep is the connection between
QtWebKit and Qt is.

Maybe a reboot of the idea is needed, QtHTML that has less features, but
knows how to work with Gecko, Android's HTML native system, Trident,
whatever. Again, STFU n00b and code... I completely understand, and I will
shut up now :)
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Network test server for Ubuntu 12.04 x64 available for Puppet - test version

2013-04-25 Thread Diego Iastrubni
On Thu, Apr 25, 2013 at 9:29 AM, Sébastien Fricker wrote:

>  Tony,
> why not also providing a VMWare image ready to use?
> Regards,
>

Do you want the cake, or the recipe? This is a FOSS community, we want the
recipe :)
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt Hebrew

2013-02-05 Thread Diego Iastrubni
(I wonder why/how I missed this thread)

Hi Genghis!

See comments inline

On Thu, Jan 31, 2013 at 5:13 PM, Genghis Khan  wrote:

> I would like to initiate a new group 
> called "Qt Hebrew" for Hebrew speakers, where new and potential Hebrew
> speaking contributors to Qt and to Qt software will be able to join and
> to share their point of views on translations and report issues
> concerning to RTL (Right to left) alignment in software.
>

Are you looking for a group of developers that work on Qt to create new
software, or developers that will work on Qt itself?

Did you know that we already have a mailing list available, in Hamakor?
http://hamakor.org.il/cgi-bin/mailman/listinfo/qt-israel

Did you know that we have monthly meetups, on which developers talk about
Qt. One is even today, and I speak about l10n (see
http://whatsup.co.il/modules.php?op=modload&name=News&file=article&sid=7072)

Most of the local community is reading this ML as well (Ynon Perek who
organized those meetings, Sivan Greenberg even shows his face once or
twice, Orgad Shaneh is even giving me a ride there today - all of them read
this ML).


> Due to a severe and deliberate depression of access for new Hebrew
> speaking contributors to Free Software projects, by certain entities
> and personalities, I find the need of such group very important.
>

Note that Qt3 had a very good support for Arabic/Hebrew/Farse (RTL in
general). I still remember sitting with Lars back in  2003 in (crap forgot
where in Germany that aKademy was...). Things were very good in Qt4 days,
and now with the move to QtQuick things got bad again. We need to code,
test and fix Qt5.

A new site for the community? I don't think its needed. I tried adding a
Hebrew forum to kde-forums a few years ago, and we closed it since it had
low traffic. The mailing list on Hamakor is *very* low traffic and it seems
it will not get higher traffic. Developers will not communicate in Hebrew,
they will keep communication in English.

The bottom line is: you have a bug? report it with a clean test case so the
developers will . You can fix it? Do it. I think that a Qt community is a
great idea, its very important that qt-community.org will list the local
community.

Lets continue this conversation off-list, better at the ocal ML.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Qt5 + QtCreator master - does not compile

2012-12-03 Thread Diego Iastrubni
On Mon, Dec 3, 2012 at 5:44 PM, Thiago Macieira
wrote:

> On segunda-feira, 3 de dezembro de 2012 14.52.48, Diego Iastrubni wrote:
> > make[3]: Entering directory
> > `/home/diego/src/qt5/build/qtdeclarative/src/imports'
> > cd folderlistmodel/ && ( test -f Makefile ||
> > /home/diego/src/qt5/build/qtbase/bin/qmake
> > /home/diego/src/qt5/qtdeclarative/src/imports/folderlistmodel/
> > folderlistmodel.pro -o Makefile ) && make -f Makefile install
> > make[4]: Entering directory
> > `/home/diego/src/qt5/build/qtdeclarative/src/imports/folderlistmodel'
> > mkdir: cannot create directory `/Qt': Permission denied
> > make[4]: *** [install_target] Error
>
> qtdeclarative installs to QT_INSTALL_QML. Please check that you have run
> configure in qtbase recently, as it needs to recreate qconfig.cpp and
> recompile
> qmake.
>
> As mentioned, I recompiled from scratch. I will try again tomorrow.

Meanwhile, using "normal" shadow builds (where the compilation dir is aside
the source) it does seem to work. Event tough this is not "officially
supported", this was working a few weeks ago.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] Qt5 + QtCreator master - does not compile

2012-12-03 Thread Diego Iastrubni
Hi All,

For a few weeks (2?) I am seeing this error in Qt5 compilations:

make[3]: Entering directory
`/home/diego/src/qt5/build/qtdeclarative/src/imports'
cd folderlistmodel/ && ( test -f Makefile ||
/home/diego/src/qt5/build/qtbase/bin/qmake
/home/diego/src/qt5/qtdeclarative/src/imports/folderlistmodel/
folderlistmodel.pro -o Makefile ) && make -f Makefile install
make[4]: Entering directory
`/home/diego/src/qt5/build/qtdeclarative/src/imports/folderlistmodel'
mkdir: cannot create directory `/Qt': Permission denied
make[4]: *** [install_target] Error

And until now QtCreator (master and 2.6) compiled. Today, QtCreator master
fails to build

make[4]: Entering directory
`/home/diego/src/qt-creator/build-master-qt5/src/tools/qmlpuppet/qmlpuppet'
linking ../../../../bin/qmlpuppet
/home/diego/src/qt5/install/lib/libQt5Declarative.so: undefined reference
to `QApplication::type()'
collect2: error: ld returned 1 exit status
make[4]: *** [../../../../bin/qmlpuppet] Error 1

Is anyone else having similar problems? I am able to reproduce both errors
on a fresh compile here. I am building Qt out of source (mkdir build; cd
build; ../configure --prefix $PWD/../install ) and QtCreator (mkdir
build; cd build; qmake ../), both on Debian testing, 64bit.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Perf about loading one 240x320 png image

2012-09-30 Thread Diego Iastrubni
On Sat, Sep 29, 2012 at 7:21 AM,  wrote:

>  Hi,
>
> ** **
>
> I am testing the image loading performance in Qt5, that the image with
> different location (qt resource or file system) and using QImage or QPixmap.
> 
>
> ** **
>
> Testing is based on a low end devices, and the result is shared as bellow:
> 
>
> ** **
>
> Loading perf (240x320 png image)
>
> from resource
>
> from file system
>
> QImage
>
> 1.135s
>
> 1.132s
>
> QPixmap
>
> 1.146s
>
> 1.182s
>
> ** **
>
> It seems the performance is really bad,,, does anyone have some insight
> about which place can be the bottleneck ?
>
> **
>

My experience is with Qt4... but I do see that QFile was slow for me. I
needed to parse a simple text file from a real disk (~10mb size, simple
state machine, no regex, application run several times for disk IO to get
working thus reducing the impact of HW). My first try was using
QFile::readLine, and using QString. I then ported it to use ANSI C and
char* (only for the parsing, the rest of the project was still using Qt4
classes).

This simple refactoring (QFile -> fopen()) changed loading time (on
windows):
   file1.txt: 515msec to 230msec
   file2.txt: 420msec to 155msec

On linux (the same HW, double booting) the Qt QIO classes were not that
slow, but the standard C functions were also faster.

Is anyone seeing similar things?
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] How about the future of qbs after Nokia sells Qt to Digia?

2012-08-11 Thread Diego Iastrubni
On Sat, Aug 11, 2012 at 4:32 PM, Charley Bay  wrote:

> Yuchen spaketh:
>
> I noticed Nokia stop developing qbs for a long time, and qtcreator's
>> wip/qbs seems stop developing too.
>> And for now Nokia sells Qt to Digia, I want know how about the future of
>> qbs?
>> If the Digia give up qbs, I will choice CMake as my build system.
>> So, any news or commens are very welcome!
>
>
> I was wondering this too -- Digia, care to comment?
>
> I know there are lots of things going on, so it's likely details like the
> "qbs" effort may take some time to plan-out.  However, it would be good to
> "get-a-feel" for direction for an effort like "qbs".
>
> Even if the answer is, "We're looking into it, and will get back to you
> later", that's fine.  However, if the decision is made, please let us know.
>
>
I know this has been discussed before... and the reasons why not have been
told (I do need to search for them again... I know), but I am personally
moving my personal projects from qmake to cmake. I am using only cmake to
build Qt applications, and I personally think everyone should.

It would be great if from now you start pushing towards making cmake the
official build system for Qt.

Again - you guys already spoken against it and I do need to review those
reasons, but this is me speaking - one of the people actually using this
beautiful system.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] QtScript vs Qml/QJsEngine ?

2012-05-30 Thread Diego Iastrubni
On Wed, May 30, 2012 at 4:11 PM, Olivier Goffart  wrote:

> On Saturday 26 May 2012 12:51:23 Stephen Kelly wrote:
> > Hi,
> >
> > There is a discussion on a kde list touching on whether there is a
> > replacement for QtScript in Qt 5.
> >
> > http://thread.gmane.org/gmane.comp.kde.devel.kwrite/32993/focus=75079
> >
> > Is the QJSEngine the start of public API providing a replacement for
> > QtScript?
>

So as an application developer, which wants to add JS scripting
capabilities to JavaScript code (so user can extend my application). What
are my options?

How can I load JS files, and call some specific functions defined
internally in those JS? I will also need to expose some API of mine to
those JS files.

(Note: I am not talking about QML at all)
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Hiding Tabs in QTabWidget

2012-03-27 Thread Diego Iastrubni
On Mon, Mar 26, 2012 at 9:43 PM, Carsten Breuer  wrote:


> Is there any other function that i can use to hide tabs?
>

Use QTabWidget::tabBar()->hide() to hide all the tabs.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] -no-stl no longer supported

2012-03-08 Thread Diego Iastrubni
On Thu, Mar 8, 2012 at 2:14 PM, Alexis Menard >
>
>  > Actually, I tested about 2 years ago the Digital Mars C++ compiler. This
> > failed nicely and was not able to compile the container classe, and you
> were
> > aware of this :)
> >
> > I might be bored again and test if the compiler now works better. Is
> anyone
> > interested?
>
> Realistically speaking how many users we are targeting here?
>

2,  Maybe PI, probably E people :)



> Last version was almost 2 years ago. Does it even run on modern
> Windows? I'm not even sure its status concerning 64 bits.
>
> Not even yourself wants to try it again. You even mentioned that you
> *tested* it so I believe you don't even ship your app code with this
> compiler.
>

I was between jobs 2 years ago and got bored. That time I started looking
also at clang. I did not ship any code compiled using any of those
compilers.

Back then the compiler I tested did not support for partial templates. I
see messages there claiming to support C++0x. Hell, if it works, do you
really care adding 2-3 new qmake.specs?

So maintaining some stuff just for the sake of it leads to wasted
> effort where people could be *more* useful.
>

You are under the impression that my working on this on my spare time, not
paid by anyone will take time from this project. I kindly disagree.


> It's in Qt4 the way it is, then it's fine.
>
> We supported way too long broken and old compilers.
>
>
So, the barrier for Qt5 is a compiler that supports C++0x? Not a bad idea.
If we want to build modern applications, on moden operating systems, then
modern tools are a must.

>From my point of view as a developer - Qt5.0, Qt5.1 will be  more or less
beta designed for earliy adopters which will have new tools anyway. If by
the time Qt5.2 comes there are new compilers witghout C++0x support - they
can die cause lack of market.

I assume Qt4 will not vanish for the next 2 years, and by then Qt5+C++0x
compilers will be more mature and popular, so people still have tools to
develop great applications. Yes, Qt4 is great, it actually runs my PC with
linux.

Again - just my point of view as indipendent developer. Maybe more
commercial customers will have different opinions then me.

With some luck maybe Qt5 will push the usage of C++0x and leaving legacy
compilers.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] -no-stl no longer supported

2012-03-08 Thread Diego Iastrubni
On Thu, Mar 8, 2012 at 11:30 AM, Thiago Macieira
wrote:

> should get their act together. (the only case I know of is Sun Studio and
> there are not one but two STL implementations available for it that are
> compliant)
>
>
Actually, I tested about 2 years ago the Digital Mars C++ compiler. This
failed nicely and was not able to compile the container classe, and you
were aware of this :)

I might be bored again and test if the compiler now works better. Is anyone
interested?

http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=c++.announce&artnum=1113

http://digitalmars.com/download/dmcpp.html
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Mirror of Qt on github?

2012-02-23 Thread Diego Iastrubni
>
> [1]
>
> http://qt-jenkins.moiji-mobile.com/jenkins/job/QtBase/label=FreeBSD_amd64,releasetype=debug/174/console


Actually, as a normal ADSL user (not business connection, no gamer
connection) I cannot clone the Qt repository as most of the time this is
what I see from my point.

Traffic shaping is a bitch.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Work on qDebug and friends

2012-02-05 Thread Diego Iastrubni
On Fri, Feb 3, 2012 at 1:10 PM, David Faure  wrote:

> Once this goes in I'll add support for %pid%, %processname% and
> %timestamp%,
> and we'll be all set :)
>

You meant %threadid% of course... right?
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Work on qDebug and friends

2012-01-24 Thread Diego Iastrubni
On Tue, Jan 24, 2012 at 2:39 PM,  wrote:
>
> Well, I plan to work on a simple environment switch which will enable the 
> default logger to show the file, line, and the log level. My idea is that an 
> IDE e.g. Qt Creator sets this environment variable, and voila, you can 
> suddenly click on your log messages :)
>
> Anyhow, there's a lot of things people might want to log in addition ( date, 
> time, PID, QThread id ...). Some might also want to log to a file, or a 
> database. Finally, the exact configuration might be compiled in, decided at 
> load time (e.g. via an environment variable), or even at run time (e.g. 
> http://codereview.qt-project.org/#change,13226 proposes to watch a file for 
> possible configuration changes) ...
>
> So, instead of trying to add all of this over time to QtCore, I think we 
> should rather go for a separate Qt Logging Addon that contains all of this. 
> What we've to ensure right now is that the key enablers are there in Qt Core 
> (see also the debug areas thread). Time and date can be trivially computed in 
> any handler later on.
>

At my work place me use a system that lets you agregate loggers. We
have one for console, file, DB, Win32 registry and I once wrote a
remote logger which sits on top of that. The API was similar to this:

MainLog::instance()->addLogger( new FileLogger) );
MainLog::instance()->addLogger( new ConsoleLogger) );
MainLog::instance()->log( __FILE__, __LINE__, __FUNCTION__, logLevel, "Hello!");
etc.

I added also macros to log function entries and function exit (to get
a lame dtrace implementation).

I would lite Qt to have something similar, but I assume that is
another layer which can be added as a 3rd party addon.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Work on qDebug and friends

2012-01-24 Thread Diego Iastrubni
On Tue, Jan 24, 2012 at 12:41 PM,  wrote:

> I've been working on a patch to the Qt logging framework:
> http://codereview.qt-project.org/#change,13433,patchset=14 . Basically it
> redefines qDebug() and friends as a macro so that we can automatically
> capture the source file, line, and function a particular message comes from:
>
>  qDebug("Hello world")
>
> actually is changed by the precompiler to:
>
>  QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO):debug("Hello World")
>
> The additional information can then be processed in a custom message
> handler, that also got a new signature:
>
> void myMessageHandler(QtMsgType type, const QMessageLogContext &context,
> const char *msg)
> {
>  switch (type) {
>case QtDebugMsg:
>printf("DBG: %s (%s:%i in %s)\n", msg, context.file, context.line,
> context.function);  }
>break;
>   // ...
> }
>
>

So, if I want to have also time/date on my logs, should I install a new
message handler?
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development