Re: [Interest] Qt 6.5.4-LTS from source -> fatal: Unable to find current revision in submodule path 'qt5compat'

2024-02-06 Thread Rainer Wiesenfarth
Not sure how Qt handles this, but whenever I ran into similar issues with
git submodules, a

git submodule sync --recursive

on the top level solved it.

Background: The submodules' remote repository may have changed in
.gitmodules, but the submodule itself still references the outdated remote
repository.

Cheers, Rainer

On Tue, Feb 6, 2024 at 4:06 PM Nuno Santos via Interest <
interest@qt-project.org> wrote:

> It seems that the same happens for qtshadertools:
>
> fatal: Unable to find current revision in submodule path ‘qtshadertools'
>
> > On 6 Feb 2024, at 15:02, Nuno Santos  wrote:
> >
> > Hi,
> >
> > While trying to build Qt 6 from source I’m having this error while
> initialising the necessary modulates with the following line:
> >
> > ➜  tqtc-qt5 git:(v6.5.4-lts) perl init-repository
> --module-subset=qt5compat,qtbase,qtdeclarative,qtimageformats,qtmultimedia,qtshadertools,qtsvg,qtwebsockets
> >
> >
> > fatal: Unable to find current revision in submodule path 'qt5compat'
> > git submodule update --force --no-fetch exited with status 32768 at
> init-repository line 207.
> >   Qt::InitRepository::exe(Qt::InitRepository=HASH(0x122808bd8),
> "git", "submodule", "update", "--force", "--no-fetch") called at
> init-repository line 452
> >
>  
> Qt::InitRepository::git_clone_all_submodules(Qt::InitRepository=HASH(0x122808bd8),
> "tqtc-qt5", 0, "", "qt5compat", "qtbase", "qtdeclarative",
> "qtimageformats", ...) called at init-repository line 674
> >   Qt::InitRepository::run(Qt::InitRepository=HASH(0x122808bd8))
> called at init-repository line 685
> >
> > Does anyone know how to overcome this?
> >
> > Thanks!
> >
> > Nuno
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>


-- 

Rainer Wiesenfarth
Senior Software Engineer
Geospatial Division


Rotebühlstr. 81, 70178 Stuttgart
Germany

rainer_wiesenfa...@trimble.com
geospatial.trimble.com/products-and-solutions/trimble-inpho

Trimble Services GmbH, Am Prime Parc 11, 65479 Raunheim, Eingetragen beim
Amtsgericht Darmstadt unter HRB 83893, Geschäftsführer: Rob Reeder, Jürgen
Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Crash in QAbstractEventDispatcher::filterNativeEvent when trying to show a QMessageBox

2022-04-14 Thread Rainer Wiesenfarth
On Thu, Apr 14, 2022 at 11:54 PM Henry Skoglund  wrote:

> On 2022-04-14 23:15, Thiago Macieira wrote:
> > [...]
> > You can't trust that data dump. The very first pointer in it is
> suspicious:
> >
> >> - d 0x02030600
> > That doesn't look like a valid pointer to me. [...]
> > ...
> Indeed it looks weird (it's pointing into 2TB territory) but I believe
> it's just an effect of Microsoft's Control Flow Guard (tm) being active
> for that .exe.
> [...]


I think it is rather due to the custom memory allocator we use -
Microsoft's default allocator performs badly when many (>20) threads and
large memory (>10GB) is involved... 

Cheers, Rainer
-- 

Rainer Wiesenfarth
Senior Software Engineer
Geospatial Division


Rotebühlstr. 81, 70178 Stuttgart
Germany

rainer_wiesenfa...@trimble.com
geospatial.trimble.com/products-and-solutions/trimble-inpho

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim, Eingetragen beim
Amtsgericht Darmstadt unter HRB 83893, Geschäftsführer: Rob Reeder, Jürgen
Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] [SOLVED] Crash in QAbstractEventDispatcher::filterNativeEvent when trying to show a QMessageBox

2022-04-14 Thread Rainer Wiesenfarth
On Thu, Apr 14, 2022 at 5:01 PM Thiago Macieira 
wrote:

> On Thursday, 14 April 2022 06:24:29 PDT Rainer Wiesenfarth wrote:
> > However, I am using QThread, and the crash happens
> > in a slot connected (queued connection) to a signal emitted by the thread
> > (m_pWorkerThread)
>
> Are you sure it was queued?
>
> Your backtrace stops in the QMessageBox::information, so we can't tell
> what it
> was called from.[...]
>

Hi, I finally found the root cause of the issue: I have an object created
in one thread, and destroyed in another one (by delete, not using
deleteLater()). This object happens to own a QFileSystemWatcher, and this
probably causes the crash - unfortunately some time later when the main
event loop is working on pending events...

After making sure the object is created and deleted by the same thread, the
problem vanishes.

Cheers, Rainer

-- 

Rainer Wiesenfarth
Senior Software Engineer
Geospatial Division


Rotebühlstr. 81, 70178 Stuttgart
Germany

rainer_wiesenfa...@trimble.com
geospatial.trimble.com/products-and-solutions/trimble-inpho

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim, Eingetragen beim
Amtsgericht Darmstadt unter HRB 83893, Geschäftsführer: Rob Reeder, Jürgen
Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Crash in QAbstractEventDispatcher::filterNativeEvent when trying to show a QMessageBox

2022-04-14 Thread Rainer Wiesenfarth
Data=0x020e0600 {_ref={...}
loopLevel=0x0001 scopeLevel=0x0002 ...} } QScopedScopeLevelCounter
  - threadData 0x020e0600 {_ref={...} loopLevel=0x0001
scopeLevel=0x0002 ...} QThreadData *
+ _ref {...} QAtomicInt
  loopLevel 0x0001 int
  scopeLevel 0x0002 int
+ eventLoops { size = 0x0001 } QStack
+ postEventList { size = 0x0050 } QPostEventList
+ thread {...} QAtomicPointer
+ threadId {...} QAtomicPointer
+ eventDispatcher {...} QAtomicPointer
+ tls { size = 0x0008 } QVector
+ flaggedSignatures {idx=0x02d0 locations=0x020e0660
{0x000140855740 "1postprocess()", 0x000140855790
"2calculationDone()"} } QThreadData::FlaggedDebugSignatures
  quitNow false bool
  canWait false bool
  isAdopted true bool
  requiresCoreApplication true bool

-- 

Rainer Wiesenfarth
Senior Software Engineer
Geospatial Division


Rotebühlstr. 81, 70178 Stuttgart
Germany

rainer_wiesenfa...@trimble.com
geospatial.trimble.com/products-and-solutions/trimble-inpho

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim, Eingetragen beim
Amtsgericht Darmstadt unter HRB 83893, Geschäftsführer: Rob Reeder, Jürgen
Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qSort replacement

2021-07-21 Thread Rainer Wiesenfarth
On Wed, Jul 21, 2021 at 6:07 PM Joshua Grauman  wrote:

> [...] I can't figure out how to
> use std::sort to sort a QList with a custom compare function. [...]
> bool variantLessThan(const QVariant , const QVariant )
> {
> return v1.toString() < v2.toString();
> }
>
> qSort(fieldsList.begin(), fieldsList.end(), variantLessThan);

[...]
>

If you are using C++17 you may also use lambdas:

std::sort(fieldsList.begin(), fieldsList.end(), [](const QVariant ,
const QVariant ) {
return v1.toString() < v2.toString();
});

(untested)

Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Queued signals lost in 5.15.0 (works in 5.12.5) (Windows)

2020-09-27 Thread Rainer Wiesenfarth
Hi all,

thanks for your assistance and hints!

I found a workaround in our code by removing a call to
QCoreApplication::processEvents() and reorganizing some code.

Concerning your suggestions:

   - I can exclude not properly registered metatypes, as all signals are of
   type "void signal()"
   - I'll tend to also exclude objects living in the wrong thread as it
   only happens for one subclass and it works in Qt 5.12.5. Plus, the
   connection is (and is intended to be) a queued connection (even with sender
   and receiver in the same thread)

My (wild) guess: it is a race condition, maybe related to the timer for
handling posted events introduced between Qt 5.12.5 and Qt 5.15.0 -
however, I do not have a more detailed analysis or specific cause.

I'll try 5.15.x (with x > 0) some day, but as we use custom builds of Qt,
this easily requires half a day per version - that is also the main reason
why I do not use git bisect or a similar approach.

Thanks again, and cheers
Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Queued signals lost in 5.15.0 (works in 5.12.5) (Windows)

2020-09-24 Thread Rainer Wiesenfarth
Hi all,

the topic is Qt on Windows, versions 5.15.0 vs. 5.12.5, connections made
with Qt::QueuedConnection, event loop of a worker thread.

I have a strange problem that for a certain queued signal/slot connection
the signal is emitted, but the event does not reach the connected slot.
This problem is reproducible in Qt 5.15.0, but does not occur in Qt
5.12.5. *Unfortunately,
the simple test program (see attached file) does not show the behavior.*

Any ideas or ringing bells?

Some details:
- GUI application with a worker thread that is running its own event loop
- QObjects of type "Job" and "Worker" all are running in the worker thread
context
- signal Job::done() is connected to Worker::invokeNext() using
Qt::QueuedConnection [1]
- for most classes JobDerived this mechanism works, Job::done() creates the
event and the worker thread's event loop picks it up and calls
Worker::invokeNext()
- for one class JobDerivedFaulty the mechanism fails. As far I could
understand the depths of Qt, the event is created and posted to the event
loop, but when the event loop does the next iteration, the event is not
found and Worker::invokeNext() is not called - in my case this leads to a
stalled application, as the worker thread never finishes.
- if I take the application built and running without this issue with Qt
5.12.5 and replace the DLLs with those from Qt 5.15.0, the issue appears.
That means there is a change in the event handling between 5.12.5 and
5.15.0 that causes the issue to appear.

[1] the queued connection is a requirement raised by the given
architecture; Worker::invokeNext() should not be directly called by
Job::done()

Cheers, a puzzled Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
<>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] (no subject)

2020-07-28 Thread Rainer Wiesenfarth
On Tue, Jul 28, 2020 at 3:53 PM David Villalobos Cambronero <
david.villalobo...@gmail.com> wrote:

> In my program I have this line:
>
> QString queryToExecute("SELECT 'Día'");
> mysql_real_query(dbConnection, queryToExecute.toUtf8().data(), 
> queryToExecute.toUtf8().length());
>
> And it works just fine on Linux and Linux, but in Windows the í char is
> not sent the correct way, I mean, the Database Server does not receive and
> í.
>
Just a guess: Does your Windows source code editor use UTF-8 encoding? If
not, this might be a cause.


> [...]
>
-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] good-compromise compatibility setting for -march=??? option (x86)?

2020-07-20 Thread Rainer Wiesenfarth
Addendum: According to https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html,
"-march=nehalem" or "-march=sandybridge" should do the trick. Both do not
have RDRND instruction set support, as René already noted.

Cheers, Rainer

On Tue, Jul 21, 2020 at 6:50 AM Rainer Wiesenfarth <
rainer_wiesenfa...@trimble.com> wrote:

> Sorry for jumping into your discussion, but I think you are talking about
> different topics.
>
> René would like to know how to set "march" when he *compiles code on* the
> Celeron (N3150) that should *run on* the (probably first generation) Core
> i7 mobile.
>
> Thiago says that "march=native" produces code that is guaranteed to run on
> the *same architecture.*
>
> My guess would be that René has to set "march" to what the i7 supports,
> using sde64 searching for Nehalem or - eventually - Sandy Bridge. As I am
> on AMD and Windows, it might be Thiago's part to provide the sde64
> information... :-)
>
> Cheers, Rainer
>
> --
> Software Engineer | Trimble Imaging Division
> Rotebühlstraße 81 | 70178 Stuttgart | Germany
> Office +49 711 22881 0 | Fax +49 711 22881 11
> http://www.trimble.com/imaging/ | http://www.inpho.de/
>
> Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
> Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
> Geschäftsführer: Rob Reeder, Jürgen Kesper
>


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] good-compromise compatibility setting for -march=??? option (x86)?

2020-07-20 Thread Rainer Wiesenfarth
Sorry for jumping into your discussion, but I think you are talking about
different topics.

René would like to know how to set "march" when he *compiles code on* the
Celeron (N3150) that should *run on* the (probably first generation) Core
i7 mobile.

Thiago says that "march=native" produces code that is guaranteed to run on
the *same architecture.*

My guess would be that René has to set "march" to what the i7 supports,
using sde64 searching for Nehalem or - eventually - Sandy Bridge. As I am
on AMD and Windows, it might be Thiago's part to provide the sde64
information... :-)

Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Where is "shininess" in these shaders?

2020-05-12 Thread Rainer Wiesenfarth
The value in question should be the materialSpecularColor term. You might
check this by simply removing the
"+ materialSpecularColor * lightStrength * pow(cosAlpha, 10))" from the
fragment shader.

The result may be too dark, so you have these options:
- introduce an additional factor from 0.0 (no specular color) to 1.0
(current) to the term above
- play with the lightStrength parameter (also affects the diffuse color
part)
- play with the lightColor parameter (also affects the ambient color part)

HTH, and cheers
Rainer


On Tue, May 12, 2020 at 5:18 PM Tom O'Reilly  wrote:

> I have little experience with OpenGL shader programs - can someone please
> help me understand some GLSL shader code?
>
> I have source code for Qt 5.14.2, including DataVisualization, and would
> like to modify the source to reduce specular “shininess” from Surface3D. This
> screenshot
> 
> shows a Surface3D that depicts topography, and it has a very “shiny” look
> to it. Debugging with gdb I’ve determined that the following shaders are
> generating this surface. Could someone please comment on how this shader
> code affects the shininess of the surface? The code doesn't look like it's
> directly based on the Phong reflection model,
> 
> e.g. I don't see an exponential "shininess" term in the code.
>
> Thanks very much!
>
> *vertex shader (“shadow.vert”)*
>
> #version 120
>
> uniform highp mat4 MVP;
>
> uniform highp mat4 V;
>
> uniform highp mat4 M;
>
> uniform highp mat4 itM;
>
> uniform highp mat4 depthMVP;
>
> uniform highp vec3 lightPosition_wrld;
>
> attribute highp vec3 vertexPosition_mdl;
>
> attribute highp vec3 vertexNormal_mdl;
>
> attribute highp vec2 vertexUV;
>
> varying highp vec2 UV;
>
> varying highp vec3 position_wrld;
>
> varying highp vec3 normal_cmr;
>
> varying highp vec3 eyeDirection_cmr;
>
> varying highp vec3 lightDirection_cmr;
>
> varying highp vec4 shadowCoord;
>
> varying highp vec2 coords_mdl;
>
> const highp mat4 bias = mat4(0.5, 0.0, 0.0, 0.0,
>
>  0.0, 0.5, 0.0, 0.0,
>
>  0.0, 0.0, 0.5, 0.0,
>
>  0.5, 0.5, 0.5, 1.0);
>
> void main() {
>
> gl_Position = MVP * vec4(vertexPosition_mdl, 1.0);
>
> coords_mdl = vertexPosition_mdl.xy;
>
> shadowCoord = bias * depthMVP * vec4(vertexPosition_mdl, 1.0);
>
> position_wrld = vec4(M * vec4(vertexPosition_mdl, 1.0)).xyz;
>
> vec3 vertexPosition_cmr = vec4(V * M * vec4(vertexPosition_mdl,
> 1.0)).xyz;
>
> eyeDirection_cmr = vec3(0.0, 0.0, 0.0) - vertexPosition_cmr;
>
> lightDirection_cmr = vec4(V * vec4(lightPosition_wrld, 0.0)).xyz;
>
> normal_cmr = vec4(V * itM * vec4(vertexNormal_mdl, 0.0)).xyz;
>
> UV = vertexUV;
>
> }
>
>
>
>
> *fragment shader (“surfaceShadowNoTex.frag”):*
>
> #version 120
>
> varying highp vec2 coords_mdl;
>
> varying highp vec3 position_wrld;
>
> varying highp vec3 normal_cmr;
>
> varying highp vec3 eyeDirection_cmr;
>
> varying highp vec3 lightDirection_cmr;
>
> varying highp vec4 shadowCoord;
>
> uniform highp sampler2DShadow shadowMap;
>
> uniform sampler2D textureSampler;
>
> uniform highp vec3 lightPosition_wrld;
>
> uniform highp float lightStrength;
>
> uniform highp float ambientStrength;
>
> uniform highp float shadowQuality;
>
> uniform highp vec4 lightColor;
>
> uniform highp float gradMin;
>
> uniform highp float gradHeight;
>
> highp vec2 poissonDisk[16] = vec2[16](vec2(-0.94201624, -0.39906216),
>
>   vec2(0.94558609, -0.76890725),
>
>   vec2(-0.094184101, -0.92938870),
>
>   vec2(0.34495938, 0.29387760),
>
>   vec2(-0.91588581, 0.45771432),
>
>   vec2(-0.81544232, -0.87912464),
>
>   vec2(-0.38277543, 0.27676845),
>
>   vec2(0.97484398, 0.75648379),
>
>   vec2(0.44323325, -0.97511554),
>
>   vec2(0.53742981, -0.47373420),
>
>   vec2(-0.26496911, -0.41893023),
>
>   vec2(0.79197514, 0.19090188),
>
>   vec2(-0.24188840, 0.99706507),
>
>   vec2(-0.81409955, 0.91437590),
>
>   vec2(0.19984126, 0.78641367),
>
>   vec2(0.14383161, -0.14100790));
>
> void main() {
>
> highp vec2 gradientUV = vec2(0.0, gradMin + coords_mdl.y * gradHeight);
>
> highp vec3 materialDiffuseColor = texture2D(textureSampler,
> gradientUV).xyz;
>
> highp vec3 materialAmbientColor = lightColor.rgb * ambientStrength
> *
>
>   

Re: [Interest] Add extra rotation to a quaternion

2020-04-05 Thread Rainer Wiesenfarth
On Sun, Apr 5, 2020 at 11:04 AM Megidd Git  wrote:

> Hi!
> I have a QQuaternion  like:
> QQuaternion(scalar:0.707107, vector:(0, 0, 0.707107))
> I want to add this extra rotation to my quaternion:
> Rotation around point QVector3D(34.5, -40, 7.16294) in XY plane by 180°
> [...]
>

Just for clarification: A quaternion does *not* describe a "rotation around
point", but just a rotation in 3D.

If you want to rotate around a given point, you first have to apply a
translation to the origin, then the rotation (which might be given as a
quaternion) and then a translation back to the intended rotational centre.

Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Fwd: External Application window title is missing in QWindow

2020-03-23 Thread Rainer Wiesenfarth
Hi Sujan,

I did not follow the rest of the discussion, but at least your sample code
contains an error:

On Sat, Mar 21, 2020 at 7:38 AM Sujan Dasmahapatra <
yellowlemontree0...@gmail.com> wrote:

> [...]
>
> /
>
> int main(int argc, char *argv[])
>
> {
>
> QApplication a(argc, argv);
>
> QProcess *process_fusion = new QProcess();
>
> process_fusion->startDetached(".\\MGL.exe  C:\\T1.nii");
>
> Sleep(2);
>
> //0.00289917 0.28096 -0.180618 = 343// Windows: Find HWND by window 
> title
>
> HWND id = FindWindow(NULL, L"MGL");
>
> if (!id)
>
> return -1;
>
>
> // Linux: Find Window ID by running xwininfo externally before compiling 
> this test
>
> //WId id = 0x4600085
>
> QTimer t;
>
> t.start(2500);
>
> // Part 1
>
> QWindow *window = new QWindow;
>
> window->setFlags(Qt::Desktop | Qt::ForeignWindow | Qt::WindowTitleHint);
>
> window = QWindow::fromWinId((WId)id);
>
>
The above line *replaces *your previously created window, including the
flags you set on it. Maybe this works:

...
// Part 1
QWindow *window = QWindow::fromWinId((WId)id);
window->setFlags(Qt::Desktop | Qt::ForeignWindow | Qt::WindowTitleHint);
QWidget *widget = QWidget::createWindowContainer(window);
...


QWidget  *widget = QWidget::createWindowContainer(window);
>
> widget->show();
>
> return a.exec();
>
> }
> 
>
> [...]
>
>
Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Crash when creating QNetworkAccessManager in qt 5.14.x

2020-02-05 Thread Rainer Wiesenfarth
[...]
>
That being said, even if I remove this call and all references to WMI code
> and CoInitializeEx (including the links to wbemuuid and ws2_32), it still
> crashes if i do not create QNetworkManager before QApplication...
>
[...]
>

Our experience is that only the first call to CoInitializeEx() succeeds and
that subsequent calls with a different threading model fail.

That being said, I _assume_ that *both*, QNetworkManager and QApplication
reach a call to CoInitializeEx() somewhere deep down the code (e.g. in a
loaded plugin or even an Explorer extension), and these two calls differ in
the selected threading model. For your application the two cases are:

QNetworkManager before QApplication: QNetworkManager initializes its
desired threading model, the call to CoInitializeEx() in QApplication
fails, but does not cause any harm.

QApplication before QNetworkManager: QApplication initializes its desired
threading model, the call to CoInitializeEx() in QNetworkManager fails and
causes a crash.

To avoid the call to QNetworkManager before QApplication, you should
probably use the /CLRTHREADATTRIBUTE:{MTA,STA,NONE} linker flag (in VS:
Linker - Advanced - CLR Thread Attribute) with the correct value for your
case.

Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Crash when creating QNetworkAccessManager in qt 5.14.x

2020-02-04 Thread Rainer Wiesenfarth
On Tue, Feb 4, 2020 at 5:18 PM Mårten Nordheim 
wrote:

> It’s likely related to the new network connection monitor inside
> QNetworkAccessManager, which uses COM.
>
> Although that by itself shouldn’t cause any issues and there’s other uses
> of COM inside Qt as well. But perhaps you didn’t indirectly use it so you
> didn’t get a conflict earlier.
>
> [...]
>

This sounds familiar. We ran into a similar issue with QFileDialog crashing
due to the wrong COM threading model being active.

I do not recall the details, but searching for "CLR Thread Attribute" (a
linking parameter) may give you some useful information.

Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Rob Reeder, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Strange issue with Qt, OpenGL and remote desktop

2019-10-25 Thread Rainer Wiesenfarth
On Thu, Oct 24, 2019 at 10:23 PM Giuseppe D'Angelo via Interest <
interest@qt-project.org> wrote:

> Il 24/10/19 17:57, Rainer Wiesenfarth ha scritto:
> > We ran into a reproducible crash that is restricted to a certain
> > scenario. The crash occurs in QGlContextPrivate::syncGlState() when
> > trying to call glDisableVertexAttribArray(). It seems the function
> > pointer is not available. However, there are some other factors involved:
>
> Very wild guess, maybe remote desktop is somehow issuing a GL context
> reset, and the code in question is not prepared to handle it?
>
> (Are we talking about QGL* classes here or QOpenGL* classes?)
>

This is (still) QGL..., we have not yet switched to the QOpenGL... classes.

Remote desktop is definitely involved in some way, as its Windows 10
version supports OpenGL > 1.1. Probably the graphics driver also, as the
issue is related to (older) Nvidia GTX boards.

In the meantime we ran the OpenGL Extensions Viewer (version 6.0.5) both
locally on one of the affected machines as well as via RDP. Over RDP, it
also crashes, during "Querying properties - Forwarding context 4.1" or "...
4.3". So, the root cause seems to be unrelated to Qt (I assumed that
earlier), but it would be nice if we could get our application / Qt 5.12.x
to cure the symptoms, as at least Qt 5.6.2 did not trigger the crash...

Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Strange issue with Qt, OpenGL and remote desktop

2019-10-24 Thread Rainer Wiesenfarth
Has anyone of you experienced application crashes when running a Qt
application that uses OpenGL over remote desktop on Windows 10?

We ran into a reproducible crash that is restricted to a certain scenario.
The crash occurs in QGlContextPrivate::syncGlState() when trying to call
glDisableVertexAttribArray(). It seems the function pointer is not
available. However, there are some other factors involved:

- the crash happens *always *when the application is run over a remote
desktop connection, but *never *if run on the same machine directly
- the crash happens *always *with the application linked to Qt 5.12.4 (or
.5), but *never *when linked to Qt 5.6.2
- the crash is restricted to two machines (out of a larger pool), one with
a GTX 560, the other with a GTX 745 graphics card
- all machines we used in testing are running Windows 10 Enterprise 64bit,
with different versions (1803 to 1903, but all updates installed)
- installing the latest available Nvidia drivers does not solve the issue

We would be happy to hear of any comparable issue, ideally together with a
solution for it... :-)

Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Expected event execution order in this multi-thread application

2019-09-30 Thread Rainer Wiesenfarth
On Mon, Sep 30, 2019 at 9:26 AM Thiago Macieira 
wrote:

> [...] Anyway, this is when you should use processEvents(): never.
>

...which would be a perfect reason to at least mark it as obsolete in Qt 6?

I strongly second Thiago's recommendation: processEvents() usually
introduces more problems than it solves.

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Building Qt from Git: Information on version of external libraries

2019-08-22 Thread Rainer Wiesenfarth
On Thu, Aug 22, 2019 at 4:27 PM Konstantin Tokarev 
wrote:

> [...]

> So, I'd like to have a page telling me "was build using versions ..." to
> have a safe fallback, and a base to judge if the latest version of an
> external library might work or not.
>
> See https://wiki.qt.io/Qt_5.12_Tools_and_Versions
> [...]
>

That's exacly what I was looking for, thanks!

I _think_ I saw this page before, but missed the "Expand" button... :-)

Cheers, Rainer
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Building Qt from Git: Information on version of external libraries

2019-08-22 Thread Rainer Wiesenfarth
On Thu, Aug 22, 2019 at 4:07 PM Konstantin Tokarev 
wrote:

> 22.08.2019, 17:01, "Rainer Wiesenfarth" :
> > I am trying to build Qt (in my case: 5.12.4) from Git and came along the
> external ICU and OpenSSL libraries. Is there any page telling which version
> of the external libraries was used when building Qt?
>
> When building Qt from sources you should better use newest available
> version, e.g. 64.1 for ICU. It doesn't really matter what version is used
> in official binaries.
>

Hmm, yes and no. I fully agree that I should go as latest as possible, but
if - like with ICU by the introduction of a namespace - the API has
changed, the build will fail. I'd like to minimize those failing builds
upfront... :-)

So, I'd like to have a page telling me "was build using versions ..." to
have a safe fallback, and a base to judge if the latest version of an
external library might work or not.

Cheers, Rainer
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Building Qt from Git: Information on version of external libraries

2019-08-22 Thread Rainer Wiesenfarth
Hi all,

I am trying to build Qt (in my case: 5.12.4) from Git and came along the
external ICU and OpenSSL libraries. Is there any page telling which version
of the external libraries was used when building Qt?

In detail: With Qt 5.6.2, I used ICU version 57.x. Since then, ICU seemed
to change quite a bit (at least with version 60, introducing namespaces).
Thus I was wondering if I should use ICU version 62-1, which was the latest
version when 5.12.0-alpha1 came out or if I should go back to ICU version
59.

The same happens for OpenSSL, and maybe also for other libraries. I would
like to see a page telling me which versions the Qt team used when they
built their binary packages...

Cheers, Rainer
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] How to properly translate an application?

2018-06-07 Thread Rainer Wiesenfarth
On Thu, Jun 7, 2018 at 2:22 PM, Mark Gaiser  wrote:

> I have a windows desktop application (Qt 5.9 LTS) here that has Dutch and
> English translations files (in .ts format) created with Qt Linguist. Any
> strings in that file show up in the Qt UI just fine in the chosen language.
>
> But if i set the language to Dutch (operating system language is English)
> then Qt's default buttons are still in English. Sure, they can be
> translated on a case-by-case basis but i don't think that
> should be needed.
>
> I don't think there is a problem with the .ts files as anything in there
> just works in the UI.
> But perhaps i missed a step?
>

​For a couple of languages, there are ​.qm files for Qt (search e.g. for
qt_de.qm). These contain the translations of Qt itself. Unfortunately,
Dutch seems to be not included here...

​The ​page http://wiki.qt.io/Qt_Localization may be useful for further
investigations.

​Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Use Qt release DLLs while debugging application

2018-04-24 Thread Rainer Wiesenfarth
On Tue, Apr 24, 2018 at 10:34 PM, Thiago Macieira  wrote:

> On Monday, 23 April 2018 22:34:20 PDT Hamish Moffatt wrote:
> > This must be an FAQ, but can I use the Qt release mode DLLs while
> > running my application compiled for debug? (In Visual Studio 2015, Qt
> 5.8).
> >
> ​[...]
>
>
> You can't do that because of Microsoft (see Gunnar's reply).
> ​[...]
>

​This is only half the truth:

*You can, if* you are interested in the debug code of your application
only, but not in the one of Qt and the C runtime.

If you use the release version of Qt, you have to make sure that you link
with the same runtime, i.e. you use /MD (Mulit-threaded DLL) for your debug
build instead of /MDd (Multi-threaded Debug DLL).

​Note: You have to make sure that any other library you link against is
using the same C runtime​
Note: I have no idea how to configure this using QMake (we use hand-crafted
.vcxproj and .props)

​Cheers, Rainer​

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Windows 10 + native QFileDialog + QPrinter + some magic = application hangs

2017-12-22 Thread Rainer Wiesenfarth
Seems the issue is solved:

The whole stuff is related to some COM library we (have to) use. During my
tests I came along this code snippet in my main.cpp:

  CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );  // (a)

  InitialUseOfCOMObject();  // (b)

  CoUninitialize();  // (c)

Using the call sequence (1)-(3) below, I can comment whatever part of (a)
to (c), but (3) will never succeed. That might be what you would expect,
either.

However, if I uncomment (a) to (c), even (1) did not succeed!

Taking a closer look at the return value of CoInitializeEx() showed that it
returned RPC_E_CHANGED_MODE, i.e. that some startup code in the COM library
already initialized it in a way incompatible with Qt. The CoUnitialize then
made the CoInitialize inside Qt to succeed. Apparently some code behind
QPrinter then again did a CoInitialize in the wrong mode, causing the
second call to fail. For a workaround, I ended up in re-initializing COM
myself and keeping this initialization until the end of my app.

So, as often: Qt is clear from guilt... :-)

Thanks to Henry and Harri for their assistance!

On Wed, Dec 20, 2017 at 10:42 PM, Rainer Wiesenfarth <
rainer_wiesenfa...@trimble.com> wrote:

> Hi all,
>
> I have a strange problem that is bugging me for a couple of days now.
> Although I think the chances are low to find someone who experienced the
> same issue, I would like to give it a try.
>
> I was able to strip the interesting part of my application down to these
> lines:
>
>   QString sProject = QFileDialog::getOpenFileName( this, tr( "Select
> Project File" ),
> m_sProjectFile, tr( "Project File (*.prj);;" "All Files (*.*)" ) );
>  // (1)
>
>   QPrinter p;   // (2)
>
>   sProject = QFileDialog::getOpenFileName( this, tr( "Select Project File"
> ),
>   m_sProjectFile, tr( "Project File (*.prj);;" "All Files (*.*)" ) );
>  // (3)
>
> Case 1: Running my application on Windows 10 (four different machines):
> - (1) succeeds
> - (2) succeeds
> - (3) hangs the application in QWindowsNativeFileDialogBase::doExec()
> at m_fileDialog->Show(owner)
>
> Case 2: Embedding the above snippet into a small sample application on
> Windows 10:
> - (1) to (3) all succeed
>
> Case 3: Setting the QFileDialog::DontUseNativeDialog option on Windows 10:
> - (1) to (3) all succeed
>
> Case 4: Running my application on Windows 7 (several machines):
> - (1) to (3) all succeed
>
> I took a close look at the m_fileDialog in QWindowsNativeFileDialogBase
> for the Windows 10 case that gets stuck:
> - at (1), m_fileDialog references a vtable in comdlg32.dll!const
> CFileOpenSave
> - at (3), m_fileDialog references a vtable in
> OneCoreUAPCommonProxyStub.dll!0x...
>
> So it seems to be related to Windows "umbrella" libraries, but I have no
> idea how. I looked even deeper into where m_fileDialog is getting assigned
> and found the call to CoCreateInstance(), where CLSID_FileOpenDialog and
> IID_IFileOpenDialog is passed in both (1) and (3), but in (1) the comdlg32
> object is returned while in (3) it is the OneCore... object.
>
> My guess so far:
> 1. The constructor or destructor of QPrinter could lead to the replacement
> of the object behind CLSID_FileOpenDialog, but
> 2. this replacement not done always, but is triggered by the "some magic"
> part in my application that is executed before (1)
>
> ​Any ideas what the "​some magic" part could be? Unfortunately my
> application is quite complex and can not be stripped down easily...
>
> ​Cheers, Rainer
>
> --
> Software Engineer | Trimble Imaging Division
> Rotebühlstraße 81 | 70178 Stuttgart | Germany
> Office +49 711 22881 0 | Fax +49 711 22881 11 <+49%20711%202288111>
> http://www.trimble.com/imaging/ | http://www.inpho.de/
>
> Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
> Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
> Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
>



-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Windows 10 + native QFileDialog + QPrinter + some magic = application hangs

2017-12-20 Thread Rainer Wiesenfarth
Hi all,

I have a strange problem that is bugging me for a couple of days now.
Although I think the chances are low to find someone who experienced the
same issue, I would like to give it a try.

I was able to strip the interesting part of my application down to these
lines:

  QString sProject = QFileDialog::getOpenFileName( this, tr( "Select
Project File" ),
m_sProjectFile, tr( "Project File (*.prj);;" "All Files (*.*)" ) );
 // (1)

  QPrinter p;   // (2)

  sProject = QFileDialog::getOpenFileName( this, tr( "Select Project File"
),
  m_sProjectFile, tr( "Project File (*.prj);;" "All Files (*.*)" ) );
 // (3)

Case 1: Running my application on Windows 10 (four different machines):
- (1) succeeds
- (2) succeeds
- (3) hangs the application in QWindowsNativeFileDialogBase::doExec()
at m_fileDialog->Show(owner)

Case 2: Embedding the above snippet into a small sample application on
Windows 10:
- (1) to (3) all succeed

Case 3: Setting the QFileDialog::DontUseNativeDialog option on Windows 10:
- (1) to (3) all succeed

Case 4: Running my application on Windows 7 (several machines):
- (1) to (3) all succeed

I took a close look at the m_fileDialog in QWindowsNativeFileDialogBase for
the Windows 10 case that gets stuck:
- at (1), m_fileDialog references a vtable in comdlg32.dll!const
CFileOpenSave
- at (3), m_fileDialog references a vtable in
OneCoreUAPCommonProxyStub.dll!0x...

So it seems to be related to Windows "umbrella" libraries, but I have no
idea how. I looked even deeper into where m_fileDialog is getting assigned
and found the call to CoCreateInstance(), where CLSID_FileOpenDialog and
IID_IFileOpenDialog is passed in both (1) and (3), but in (1) the comdlg32
object is returned while in (3) it is the OneCore... object.

My guess so far:
1. The constructor or destructor of QPrinter could lead to the replacement
of the object behind CLSID_FileOpenDialog, but
2. this replacement not done always, but is triggered by the "some magic"
part in my application that is executed before (1)

​Any ideas what the "​some magic" part could be? Unfortunately my
application is quite complex and can not be stripped down easily...

​Cheers, Rainer

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QWebSocket/Server

2017-09-19 Thread Rainer Wiesenfarth
On Tue, Sep 19, 2017 at 4:27 AM, Reinhardt Behm  wrote:

> I am using QWebSocket and QWebSocketServer (Qt5.5)
> Is it possible to have another Server (as HTTP server) listening at the
> same
> port?
>

​No, each port can be listened to only by one server. This is by design of
the underlying protocol (TCP, but also UDP).
​

> QWebSocket supports binaryFrameReceived(). Is there any support to send
> Frames?
>

​sendBinaryMessage()?​

QWebSocket has a signal bytesWritten(). Any support for receive progress?
>

​No, this is also not supported by the underlying protocol. You will
receive ​an error() signal if something went wrong.

If you need acknowledge messages, you have to add these to your own
protocol.

​Cheers, Rainer​

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Licensing PITA

2017-05-05 Thread Rainer Wiesenfarth
2017-05-04 20:02 GMT+02:00 Bob Hood :

> I am trying to create a commercial, static build of 5.7.1


​I ran into a similar problem with building a commercial Qt 5.6.x ​from the
Git repo. This does not work out-of-the-box as the Git source seems to be
targeted on the GPL'ed users only.

AFAIK you have to remove some files and add some others (from a commercial
source package) to be able to build a commercial version.

I might retrieve more detailed information on the process, but I am not
sure if I am allowed (by the Qt people) to share it - given the fact that
there seems to be no official howto by them...

​Cheers, Rainer​


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake one-line Qt version checking?

2017-01-05 Thread Rainer Wiesenfarth
Ah, forget about it, read it the wrong way...


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qmake one-line Qt version checking?

2017-01-05 Thread Rainer Wiesenfarth
2017-01-05 16:56 GMT+01:00 André Hartmann :

> lessThan(QT_MAJOR_VERSION, 5): message("This program requires Qt 5.8")
> else: lessThan(QT_MINOR_VERSION, 8): message("This program...")
>
> Is there a way to do a comparison here like in C++ in one line?
>

​With C++ >= 11, ...

static_assert(QT_VERSION >= 0x050800, "​This program requires Qt 5.8 or
higher");

​...should work​ (untested).

​Best regards
Rainer​


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Platform dependent *.qrc entries

2017-01-03 Thread Rainer Wiesenfarth
2017-01-03 23:50 GMT+01:00 Thiago Macieira :

> On terça-feira, 3 de janeiro de 2017 21:31:52 BRST Bernhard B wrote:
> > android{
> > RESOURCES += android.qrc
> > }
> >
> > ios{
> >RESOURCES += ios.qrc
> > }
> >
> > But as most of the resources are shared between all targets, keeping
> those
> > resource files in sync is really difficult. Is there a possibility to use
> > just one *.qrc file and  specify platform dependent entries in a
> different
> > way?
>
> Why don't you use three resources?
>
> RESOURCES += common.qrc
> android: RESOURCES += android.qrc
> ios: RESOURCES += ios.qrc
>

​Probably as this does not make it obvious for a developer that she has to
add a version of a platform dependent resource to _all_ platform resource
files?​

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.6.2 Git on Windows: -force-debug-info configure option triggers linker warning on usage

2016-12-07 Thread Rainer Wiesenfarth
Thanks, Gunnar, the patch works!

diff --git a/qmake/generators/win32/msvc_nmake.cpp
b/qmake/generators/win32/msvc_nmake.cpp
index ae139c2..41bec4c 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -409,14 +409,21 @@ void NmakeMakefileGenerator::init()
 project->values("QMAKE_DISTCLEAN").append(tgt + ".lib");
 }
 if (project->isActiveConfig("debug_info")) {
-// Add the compiler's PDB file.
-QString pdbfile = var("OBJECTS_DIR") + project->first("TARGET") +
".vc.pdb";
+QString pdbfile;
+QString distPdbFile = tgt + ".pdb";
+if (project->isActiveConfig("staticlib")) {
+// For static libraries, the compiler's pdb file and the dist
pdb file are the same.
+pdbfile = distPdbFile;
+} else {
+// Use $${TARGET}.vc.pdb in the OBJECTS_DIR for the compiler
and
+// $${TARGET}.pdb (the default) for the linker.
+pdbfile = var("OBJECTS_DIR") + project->first("TARGET") +
".vc.pdb";
+}
 QString escapedPdbFile = escapeFilePath(pdbfile);
 project->values("QMAKE_CFLAGS").append("/Fd" + escapedPdbFile);
 project->values("QMAKE_CXXFLAGS").append("/Fd" + escapedPdbFile);
 project->values("QMAKE_CLEAN").append(pdbfile);
-// Add the linker's PDB file to the distclean target.
-project->values("QMAKE_DISTCLEAN").append(tgt + ".pdb");
+project->values("QMAKE_DISTCLEAN").append(distPdbFile);
 }
 if (project->isActiveConfig("debug")) {
 project->values("QMAKE_CLEAN").append(tgt + ".ilk");

​Best regards
Rainer​

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11 <+49%20711%202288111>
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.6.2 Git on Windows: -force-debug-info configure option triggers linker warning on usage

2016-12-05 Thread Rainer Wiesenfarth
2016-12-05 17:56 GMT+01:00 Gunnar Roth :

> Try to use this patch and tell me if it works for you


​I'll do, but probably only in a few days. I'll keep you informed.​


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt 5.6.2 Git on Windows: -force-debug-info configure option triggers linker warning on usage

2016-12-05 Thread Rainer Wiesenfarth
I checked out Qt 5.6.2 from the git repository and configured it with

..\configure -prefix "%DESTINATION_DIR%" -release -force-debug-info [...]

Qt configures, builds and installs ok, but when using the result in a
project, I get this linker warning for every executable using Qt:

qtmain.lib(qtmain_win.obj) : warning LNK4099: PDB 'qtmain.vc.pdb' was not
found with 'qtmain.lib(qtmain_win.obj)' or at
'L:\SVN_Work\source\mb\BIN\Release_x64\qtmain.vc.pdb'; linking object as if
no debug info

​I found the file in (builddir)\qtbase\src\​winmain\.obj\release but it
does not get copied to the installation directory.

​Is this a bug / missing feature of the Qt build process or am I doing
things wrong?​


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.6.0: Strange "QProcess: CreateNamedPipe failed. (access denied)" messages

2016-11-14 Thread Rainer Wiesenfarth
2016-11-10 17:08 GMT+01:00 Joerg Bornemann <joerg.bornem...@qt.io>:

> On 09/11/2016 14:24, Rainer Wiesenfarth wrote:
>
> Environment 1: Windows 10.
>> - Dad starts first instance of Son => error message from Qt "QProcess:
>> CreateNamedPipe failed. (access denied)" (3 times)
>>
>
> This indicates that the pipes for stdin/stdout/stderr could not be created
> for whatever reason. Would it be possible to provide an example that
> exhibits the issue?
>

​I attach the four files I also added to the issue created with Qt support.
Unfortunately, they could not reproduce the observed behavior on Windows
10. Here the text of the support issue:

I create multiple QProcess instances from a worker thread, tying their
> output
> to the GUI. With Windows 7 this works as expected.
> With Windows 10 the first (and only the first!) attempt fails, issueing
> three
> warnings "QProcess: CreateNamedPipe failed. (access denied)" and
> showing no output of this first child process. However, any subsequent try
> on
> Windows 10 then also succeeds.
> I attached two example programs (parent and child) and screenshots of both
> Windows 7 and Windows 10.
> Please build the child and parent program and place them in the same
> folder,
> then start the parent. Clicking the "Create Child" button stimulates
> the desired action.


​I ran the test on multiple machines with both Windows 7 and Windows 10,
but ran into that issue only on one of them​. I would be happy if you could
run the test on other machines (preferably Windows 10) to help locating the
reason for this behavior.


-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper


CreateNamedPipeProblemChild.7z
Description: Binary data


CreateNamedPipeProblemParent.7z
Description: Binary data
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt 5.6.0: Strange "QProcess: CreateNamedPipe failed. (access denied)" messages

2016-11-09 Thread Rainer Wiesenfarth
This is my situation:

I have two applications, lets call them Dad and Son, both of them using Qt
(in my case: 5.6.0). Dad starts multiple instances of Son, using QProcess.

I use two different environments:

Environment 1: Windows 10.
- Dad starts first instance of Son => error message from Qt "QProcess:
CreateNamedPipe failed. (access denied)" (3 times)
- first Son's output is not caught in Dad, but Son runs as expected.
- Any subsequent instance of Son started by Dad works fine,
- there is no more error messages and
- Son's output is caught by Dad.

Environment 2: Windows 7.
- Dad starts first instance of Son => no error
- first Son's output is caught in Dad and Sun runs as expected.
​- Any subsequent instance of Son started by Dad works fine,
- there is no error messages and
- Son's output is caught by Dad.
​
In case this matters: Dad creates and starts the QProcess instances in a
separate thread, not in the main /GUI thread.

Does anyone of you have an idea what happens and how it can be prevented?

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.6.1(-1) release for Visual Studio 2010?

2016-07-29 Thread Rainer Wiesenfarth
2016-07-29 10:01 GMT+02:00 Julius Bullinger :

> Then the documentation at
> http://doc.qt.io/qt-5/supported-platforms-and-configurations.html#qt-5-6
> should probably be corrected, because it says that MSVC 2010 is supported.
>

​Why should one correct it? MSVC 2010 *is* supported - however, there is no
prebuild package available for it. ;-)​

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QML] Qt.formatDateTime() and AM/PM

2016-07-14 Thread Rainer Wiesenfarth
2016-07-14 14:31 GMT+02:00 Elvis Stansvik :

> estan@newton:~$ cat test.qml
> import QtQuick 2.0
>
> Item {
> Component.onCompleted: console.info(Qt.formatDateTime(new Date(),
> "hh:mm:ss AP"));
> }
> estan@newton:~$
>

​I am able to reproduce the problem with 5.6.0 on Windows, using your
snippet:​

​D:\Develop\tests>qmlscene test.qml
qml: Do 03:04:31
​
​No am/pm is added, but hour is 0-12. But...

... this is with "Region and Language" set to German. If I set it to
English, the output is as expected:

D:\Develop\tests>qmlscene test.qml
qml: Thu 03:05:37 PM

​So the problem seems to be the missing translation for "PM" and "AM"​, but
this may be related to Windows rather than Qt.

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTextDocument and Undo

2016-07-01 Thread Rainer Wiesenfarth
2016-07-01 9:01 GMT+02:00 Igor Mironchik :
> What if I create Text, then change text in it, then make two undo commands?!
> It undo changing text and creation of Text item. Ok. But...
>
> Then I want to redo this two commands. I redo "create", so Text item now is
> created again, then I redo "text change" that implemented with
> QGraphicsTextItem::document()->redo(). But...
>
> But Text item with its QTextDocument was created again so QTextDocument's
> undo stack is empty. I.e. redo() does nothing.

I am not sure if this will work (it has been some time since I used
undo/redo), but can't you keep the created text item, including it's
undo stack until the text-item-create-command is _deleted_ (not only
undone)? Or is this approach what you mean by "Implement your own undo
commands for text interactions in Text item?"

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Slightly OT: On Windows, QFile operations failing due to on-access scanners

2016-06-30 Thread Rainer Wiesenfarth
(Qt 5.3.2, VS2010 on Windows)

Hi all,

this is off-topic as the problem is not caused by Qt, however, QFile
is involved and might be the one to handle it. In any case, I'd like
to hear if others have a similar problem and how they deal with it:

From time to time we get issues from individual customers that our
software failed to access files, usually during long-running
processing tasks. This happens unpredictable and for random files.
Although we are not able to proove it, we assume that this is caused
by on-access virus scanners that lock a file for a short amount of
time to look at it. If a QFile operation tries to access the file
during that time it fails.

For some cases we could avoid this by retrying the operation, but I am
not willing to encapsulate every QFile operation in a retry loop.

Did anyone out there run into this issue and find a solution for it?

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.x from git for commercial licensees (Windows)

2016-05-03 Thread Rainer Wiesenfarth

Am 02.05.2016 um 18:11 schrieb Thiago Macieira:

On segunda-feira, 2 de maio de 2016 11:24:33 PDT Rainer Wiesenfarth wrote:

I would simply delete the LICENSE.PREVIEW.COMMERCIAL, but licheck.exe is not
available...


Hmm... the removal of LICENCE.PREVIEW.COMMERCIAL and addition of the actual
commercial licence files should have been done before tagging, but I guess
we've forgotten about that in the release team...

Anyway, licheck.exe should be in your last commercial source packages.


Ok, I made some changes in the root dir (added the .QT-* files, removed 
the LGPL_EXCEPTION.txt and LICENSE.* files) and in qtbase (same as above 
plus adding the timestamp). And I added the licheck files from the 
"official" 5.6.0 ZIP archive.


Qt now configures, but shows only this information for the license:

LicenseeWiesenfarth Rainer
License ID..
Product license.Enterprise Edition
Expiry Date.

Is this the expected behavior?

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.x from git for commercial licensees (Windows)

2016-05-02 Thread Rainer Wiesenfarth
Hmm, apparently this is the part of code that is responsible for the behavior:

...
void Tools::checkLicense(QMap<QString,QString> ,
const QString , const QString )
{
QString tpLicense = sourcePath + "/LICENSE.PREVIEW.COMMERCIAL";
if (QFile::exists(tpLicense)) {
dictionary["EDITION"] = "Preview";
dictionary["LICENSE FILE"] = tpLicense;
return;
}

dictionary["LICHECK"] = "licheck.exe";

const QString licenseChecker =
QDir::toNativeSeparators(sourcePath + "/bin/licheck.exe");

if (QFile::exists(licenseChecker)) {
...

I would simply delete the LICENSE.PREVIEW.COMMERCIAL, but licheck.exe is not 
available...

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.x from git for commercial licensees (Windows)

2016-05-02 Thread Rainer Wiesenfarth
From: Mitch Curtis [mailto:mitch.cur...@qt.io] 
> From: Rainer Wiesenfarth
> > is there any commercial licensee out there who built his Qt 5.x (in my
> > case: 5.6.0) version from a git clone on Windows?
> > 
> > I am currently struggling in making the configure executable locate 
> > and use my license information. Unfortunately this part of the 
> > configuration is not documented very well...
>
> Are you referring to this section?
>
> http://doc.qt.io/qt-5/windows-building.html#step-1-install-the-license-file-commercial-editions-only

Yes and no. I have my .qt-license in %USERPROFILE% (and in 
%HOMEDRIVE%\%HOMEPATH% and %APPDATA%), but the configure script simply prints

Licensee
License ID..
Product license.Preview Edition
Expiry Date.........

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt 5.x from git for commercial licensees (Windows)

2016-05-02 Thread Rainer Wiesenfarth
Hi all,

is there any commercial licensee out there who built his Qt 5.x (in my case: 
5.6.0) version from a git clone on Windows?

I am currently struggling in making the configure executable locate and use my 
license information. Unfortunately this part of the configuration is not 
documented very well...

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Add margin spacing between QComboBox item icon and text ?

2016-01-19 Thread Rainer Wiesenfarth
From: Bo Thorsen
> Den 18-01-2016 kl. 19:36 skrev Edward Sutton:
> > When the QComboBox drop-down is activated, the icons overlay the text 
> > making it hard to read.
> >
> > Is there a property or style sheet to adjust this?
> >
> > For the currently selected its, the icon and text have good spacing 
> > QComboBox.
> >
> > Item icon overlays text.
> 
> I don't know what you did, but that's not how it normally looks. 
> Obviously not.

We experience a similar behavior with Qt 5.3.2 on Linux, but only when using 
style sheets. There seems to be no option to get rid of the tick mark. See 
attached screenshot...

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] link error (and probably a dumb question)

2015-09-16 Thread Rainer Wiesenfarth

Am 16.09.2015 um 11:19 schrieb René J.V. Bertin:

[...]  1st command fails and the 2nd succeeds:

1%> [...] g++ [...] -L/opt/local/build/qtbase/lib -lQt5Sql -lQt5Core.so [...]
.obj/qsql_sqlite.o: In function `qMakeError':
[...] undefined reference to `QSqlError::QSqlError [...]

2%> [...] g++ [...] /opt/local/build/qtbase/lib/libQt5Sql.so 
/opt/local/build/qtbase/lib/libQt5Core.so [...]

[...]

When I give only QtCore via a full path I'm left with errors about an undefined 
reference to
QSqlError::QSqlError [...]


I _think_ that the first command resolves references strictly ordered 
(Q55Sql first, then Qt5Core) while the second resolves them in common.


In this case, using

  ... -lQt5Sql -lQt5Core -lQt5Sql ...

should solve the issue.


Another guess: Does replacing "-lQt5Core.so" with "-lQt5Core" in the 
first command change the behavior?


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QFileSystemWatcher and accesing files in monitored directory...

2015-08-31 Thread Rainer Wiesenfarth
From: Igor Mironchik
> [...]
> Even if try to open file in ReadWrite mode it opens successfully...
> [...]
> 
> And sometimes I receive: loading failed and pixmap is null. Reloading of such
> images is successfull...
> 
> I can't reproduce reading of saved on the half image. May be ReadWrite mode
> has fixed the problem... I do not know.

Just another idea:

Do you control the writer side, too? In that case you might write to a temp 
file and rename/move it to the final place and name once it is complete. This 
way the reader either will find a complete file or no file at all.

Best regards
Rainer Wiesenfarth
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Dynamic translation

2015-07-27 Thread Rainer Wiesenfarth
From: Graham Labdon
 My system maintains a system log which we require to be in English.
 Some of the strings used to log messages are also used to present
information
 to the user in the selected language

We had the same problem and solved it by implementing a special message
class that contains two QStrings, one translated, one original.  The
application then may decide which version of the message it needs. This
works, although creating a message looks awful:

  ICMessage( Context, QT_TRANSLATE_NOOP( Context, EnglishMessage ) );

The constructor uses code similar to

  m_original = text;
  m_localized = QCoreApplication::translate( context, text );

Unfortunately you cannot define a macro for the constructor QT_TRANSLATE
stuff, as lupdate would not find the strings :-(

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Dynamic translation

2015-07-25 Thread Rainer Wiesenfarth

Am 24.07.2015 um 16:38 schrieb Graham Labdon:

Hi My Qt application supports dynamic translation IE the user can
change languages whilst the application is running

Now I have a need to find the English equivalent of a translated
string and don't seem to be able to find a way


Depending on the use case I see two options:

1. search the .ts file for the translated string

2. let the user switch to English (or, if possible, to an unsupported 
language) to get the original string


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] https://login.qt.io/login down?

2015-07-23 Thread Rainer Wiesenfarth
Is the qt.io site - at least the support pages etc. - down or do I have a
problem at my side of the tube?

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer




smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [SOLVED] Re: https://login.qt.io/login down?

2015-07-23 Thread Rainer Wiesenfarth
From: Rainer Wiesenfarth
 Is the qt.io site - at least the support pages etc. - down or do I have a
 problem at my side of the tube?

As usual: As soon as you click the Send button for the e-mail, the problem
vanishes...

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-22 Thread Rainer Wiesenfarth

Am 21.07.2015 um 21:18 schrieb Jason H:

Once I was put in charge of a project where an engineer had
replaced(inherited) all the Qt Q* classes used in the project
to classes that did not have a 'Q' as a first letter. No
other changes. And yes, that engineer was a contractor.


Let me guess: The reason given was This way we can easily replace Qt by 
another framework!... - no comment.


But remember: Contractors are nothing more than colleagues, with just 
another work model. Why should there be less bad engineers working as 
contractor than amongst your team? :-)


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-20 Thread Rainer Wiesenfarth
From: Guido Seifert
 Hi, just seen this in project's code. Worse, I have been told to do it
 exactly this way in another code part.

What about:
- the QObject's parent? Is it set with setParent(other-parent()) or set to 
nullptr?
- the QObject's thread? Is it guaranteed that it is the same thread that 
creates the copy?
- the QObject's children? Who is going to own them and when are they deleted?
- the QObject's connections? Will all copies emit the same signals, will all 
copies have their slots called?

...or just look at the Qt documentation on QObject, at 
http://doc.qt.io/qt-5/qobject.html#no-copy-constructor.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

2015-07-20 Thread Rainer Wiesenfarth

Am 21.07.2015 um 03:33 schrieb Tony Rietwyk:

[...]  We'll need to see some code to decide how bad it is.


I'd say: Whatever the code looks like now, it is bad enough not to use 
it any longer. And code is not static, so it can get worse any time... :-)


The Qt docs state that copying a QObject is a bad idea, and there are 
only a few occasions where I question the docs.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QFutureWatcher and qRegisterMetaType

2015-07-10 Thread Rainer Wiesenfarth

(TOFU to keep full version of original solution without hiding my reply)

I am not sure how your initial project looks, but for the code you sent, 
I would suggest a different approach:


class Worker
{
  public:
int doHeavyStuff()
{
  return 42;
}
};


class Handler
{
  public:
Handler()
  : m_worker( new Worker )
{ }

QFutureint meaningOfLife()
{
  return QtConcurrent::run( m_worker, Worker::doHeavyStuff );
}

  private:
Worker *m_worker;
};

NOTE: This code snippet is untested, it is based on this article: 
http://doc.qt.io/qt-4.8/qtconcurrentrun.html


If your application is as simple as above, you might even drop the 
Handler class (as it does almost nothing now).



Am 10.07.2015 um 12:51 schrieb Lorenz Haas:

Hi,

I try to use QFuture/QFutureWatcher for my own project. So far I have
this simplified setting, in which Handler is living in the GUI thread:

class Worker : public QObject
{
   Q_OBJECT

   public slots:
 void doHeavyStuff(QFutureInterfaceint inter) {
   inter.reportResult(42);
   inter.reportFinished();
 }
};

class Handler : public QObject
{
   Q_OBJECT

   public:
 Handler(QObject *parent = 0) :
   QObject(parent),
   m_worker(new Worker)
 {
   m_worker-moveToThread(m_thread);
   connect(m_thread, QThread::finished, m_worker,
QObject::deleteLater);
   m_thread.start();
 }

 QFutureint meaningOfLife()
 {
   QFutureInterfaceint inter;
   inter.reportStarted();
   QMetaObject::invokeMethod(m_worker, doHeavyStuff,
Qt::QueuedConnection, Q_ARG(QFutureInterfaceint, inter));
   return inter.future();
 }

   private:
 Worker *m_worker;
 QThread m_thread;
};

This works fine if I add qRegisterMetaTypeQFutureInterfaceint
 (QFutureInterfaceint); somewhere. This, however, makes me nervous
because it feels like I have not to do this. It's a pure paranoid feeling...
Therefore:
   a) Is the approach above okay?
   b) Why QFutureInterface isn't registered already by Qt? Is it because
one can't register templated classes easily?
[...]


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Legal: Using Qt examples in commercial closed source applications

2015-06-22 Thread Rainer Wiesenfarth
We would like to include a code snippet of the Qt examples in our commercial
closed source application. The file containing this code is published under
the BSD license. We ourselves hold commercial licenses of Qt.

Question: Do we have to follow the BSD license terms, namely the
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution. or is this covered
by our commercial license?

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer




smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Legal: Using Qt examples in commercial closed source applications

2015-06-22 Thread Rainer Wiesenfarth
From: Bo Thorsen
 
 Den 22-06-2015 kl. 14:45 skrev Rainer Wiesenfarth:
  We would like to include a code snippet of the Qt examples in our
  commercial closed source application. The file containing this code is
  published under the BSD license. We ourselves hold commercial licenses
of
  Qt.
 
  Question: Do we have to follow the BSD license terms, namely the
  Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.
  or is this covered by our commercial license?
 
 There's no way the QtCompany lawyers will allow you to relicense parts of
Qt
 as BSD code, so you can't copy the code into that file.
 [...]

Just for clarification: The files in the Qt example directory
(qtbase/examples/widgets/layouts/flowlayout/flowlayout.*) do contain the BSD
license text, so we do NOT relicense Qt code under a BSD license, but would
like to use BSD-licensed Qt code in a closed source commercial application.

Thus we need to know if we, as commercial licensees, may use the FlowLayout
class without mentioning this fact in documentation...

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Using QWebSocketServer in a thread other than the GUI thread?

2015-05-27 Thread Rainer Wiesenfarth

Am 27.05.2015 um 11:48 schrieb Elvis Stansvik:

2015-05-27 Rainer Wiesenfarth:
 Question: Is it possible to use QWebSocketServer in a thread other
 than the GUI thread? How?

I think the real question is why you would want to do that. [...]


In my special case: to create a communication service component for use 
inside an application that may or may not have a running event loop. 
Thus the component thread's event loop should do the necessary handling.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Using QWebSocketServer in a thread other than the GUI thread?

2015-05-27 Thread Rainer Wiesenfarth

Am 27.05.2015 um 15:49 schrieb Jérôme Godbout:

Before making the moveToThread(), remove the parent of the object,
-setParent(nullptr);
Once moved, you can reparent with object into that Thread.


The QWebSocketServer does not have a parent. The problem does not occur 
with this class itself, but with QNativeSocketEngine, which seems to 
exist somewhere in the depth of Qt.


The QNativeSocketEngine was created by Qt internals in the GUI thread 
context, but is now used by the QWebSocketServer which lives in a 
separate thread. Seems these two classes do not expect this to happen...



[...]
On Wed, May 27, 2015 at 3:43 AM, Rainer Wiesenfarth
rainer_wiesenfa...@trimble.com mailto:rainer_wiesenfa...@trimble.com
wrote:

(Qt 5.3.2 Windows msvc-2010 64bit)

I would like to add a QWebSocketServer to an existing application. I
would like to have all its operation handled by a thread different
from the GUI thread to get communication separated from the GUI part.

However, when I use moveToThread with the QWebServerSocket, I get
these warnings on incoming connections:

   QObject: Cannot create children for a parent that is in a different
 thread.
 (Parent is QNativeSocketEngine(0x1b12ab0),
   parent's thread is QThread( GUI_thread ),
   current thread is QThread( communication_thread )

In addition, the disconnect event never comes through, probably as a
consequence of the warning.

Question: Is it possible to use QWebSocketServer in a thread other
than the GUI thread? How?

[...]


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Using QWebSocketServer in a thread other than the GUI thread?

2015-05-27 Thread Rainer Wiesenfarth

(Qt 5.3.2 Windows msvc-2010 64bit)

I would like to add a QWebSocketServer to an existing application. I 
would like to have all its operation handled by a thread different from 
the GUI thread to get communication separated from the GUI part.


However, when I use moveToThread with the QWebServerSocket, I get these 
warnings on incoming connections:


  QObject: Cannot create children for a parent that is in a different
thread.
(Parent is QNativeSocketEngine(0x1b12ab0),
  parent's thread is QThread( GUI_thread ),
  current thread is QThread( communication_thread )

In addition, the disconnect event never comes through, probably as a 
consequence of the warning.


Question: Is it possible to use QWebSocketServer in a thread other than 
the GUI thread? How?


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Rainer Wiesenfarth

Am 05.02.2015 um 20:21 schrieb Till Oliver Knoll:

[...]
Other links that I found seem to support that, that the underlying
scheduler figures out the best read/write strategy, and any attempt by
the application to implement that by itself would be counter-productive
[...]


One addition: If using the OS without an own scheduler, it makes sense 
to give the OS an idea what you are about to do with the file. Reading 
chunks of 256 bytes vs. reading chunks of 1 MB vs. mapping the whole 
file into memory probably has a higher impact on performance than the 
number of threads used.


For your application: Memory mapping the files, limiting the total 
mapped size and thus the number of simultaneously mapped files should 
give the best performance. If you have eight worker threads, each may 
map its input file into memory and simply access it. The writer part 
then could be a single thread.


Personally, I would give QtConcurrent::mappedReduced() the first try, 
with all reading (on memory mapped files) and resampling in the map 
function and the writing in the reduce function.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Rainer Wiesenfarth
From: Till Oliver Knoll
 Am 05.02.2015 um 14:25 schrieb Till Oliver Knoll:
  ...
  
  Does it make sense to guarantee/enforce sequential (exclusive)
  access to the harddisk on application level, or would I
  re-invent functionality already present in the underlying
  OS/disk driver (and maybe even sacrifice performance)?
 
 I eventually found a link which seems to confirm that
 it would be best to only have sequential read/write access
 with physically spinning drives, that is, have some kind of
 IO Manager in the application:
 
 http://www.tomshardware.co.uk/forum/251768-32-impact-concurrent-speed
 [...]

Please note that this post is more than five years old. Things - namely I/O 
schedulers in operating systems and hard disk caching - have changed since then.

I would _assume_ that any modern OS is capable of scheduling I/O for maximum 
performance. In addition, an own I/O scheduler would probably only work for 
bare metal access to the harddisk. Otherwise, the underlying file system and 
its potential fragmentation might void all your effort.

Thus my approach would be to start any number of concurrent reads and writes 
that makes sense for the application side and start optimizing if (and only 
if!) throughput is too bad.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building the latest Qt 5.X

2015-01-22 Thread Rainer Wiesenfarth

Am 23.01.2015 um 05:15 schrieb Scott Aron Bloom:

What version of OpenSSL does Qt build against on windows?


Hi Scott (and others that might be interested),

here is how we built Qt 5.3.2 on Windows. Might include nonsense, but 
works for us. If you need details, feel free to contact me off-the-list.


We built Qt 5.3.2 with OpenSSL 1.0.1i and ICU 53.1, using both Visual 
Studio 2010 and 2013. Other build tools were Perl 5.16.2 (later should 
work also), Python 2.7.3 (version 3.x.y not tested) and Ruby 1.9.3p448 
(versions 2.0.x and 2.1.x not tested).


Our configure call is:

configure.bat -debug-and-release -force-debug-info -commercial \
  -c++11 -shared -no-ltcg -nomake examples -qt-sql-sqlite \
  -opengl desktop -qt-zlib -qt-pcre -qt-libpng -no-libjpeg -no-angle \
  -openssl -I %QTDIR%\..\openssl-1.0.1i\include \
  -icu -I %QTDIR%\..\icu-53.1\include -L %QTDIR%\..\icu-53.1\lib64 \
  -no-dbus -mp -confirm-license

with directory structure

 qt-5.3.2
   openssl-1.0.1i
   icu-53.1
   gnuwin32
   qtbase
   ...

i.e. OpenSSL and ICU included into the Qt tree. %QTDIR% oints to 
...\qt-5.3.2\qtbase


To have all in place, we had to call both nmake and nmake install.

Ah, BTW: Building the documentation is buggy in 5.3.2, if you need a 
fix, give me a note.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.x and Plugin-Build-Key

2015-01-05 Thread Rainer Wiesenfarth
From: Christoph Cullmann
 for our commercial application, we ship the Qt dynamic libraries in our
 package, as we can't rely on the system libs to be up-to-date enough.
 
 In Qt 4.x, we used the build-key of the plugins to disallow qt plugins of the
 system to be loaded, should there be some Qt 4.x stuff installed.
 
 (http://qt-project.org/doc/qt-4.8/deployment-plugins.html#the-build-key)
 
 For Qt 5.x, that feature seems to have gone.
 [...]

We had the very same problem with Qt 4.x and also used the build key approach. 
For our - not yet shipped - Qt 5.x based version we use a qt.conf file (in the 
application's directory) to override the plugin path.

According to the docs this should do the trick, though I did not test it yet 
(currently there is no other Qt 5.x on the machine).

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] valgrind --tool=helgrind and Qt 5.3.2 on Linux: lock order violated

2014-12-11 Thread Rainer Wiesenfarth
I am not yet very familiar with helgrind, but if I use it on my application
I get a couple of messages like this:

==26941== 
==26941== 
==26941== Thread #1: lock order 0x723FA50 before 0x723FA90 violated
==26941== 
==26941== Observed (incorrect) order is: acquisition of lock at 0x723FA90
==26941==at 0x4C3053B: ??? (in
/usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==26941==by 0x6E11DA5: QObject::~QObject() (qmutex.h:136)
==26941==by 0x6E17848: QTimer::~QTimer() (qtimer.cpp:163)
==26941==[...]
==26941== 
==26941==  followed by a later acquisition of lock at 0x723FA50
==26941==at 0x4C30963: ??? (in
/usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==26941==by 0x6E11E83: QObject::~QObject() (qorderedmutexlocker_p.h:106)
==26941==by 0x6E17848: QTimer::~QTimer() (qtimer.cpp:163)
==26941==[...]
==26941== 
==26941== Required order was established by acquisition of lock at 0x723FA50
==26941==at 0x4C3053B: ??? (in
/usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==26941==by 0x6E0ED0C: QMetaObjectPrivate::connect(QObject const*, int,
 QMetaObject const*, QObject const*, int, QMetaObject
const*, int, int*)
 (qorderedmutexlocker_p.h:82)
==26941==by 0x6E0F677: QObject::connect(QObject const*, char const*,
QObject const*,
 char const*, Qt::ConnectionType) (qobject.cpp:2713)
==26941==[...]
==26941== 
==26941==  followed by a later acquisition of lock at 0x723FA90
==26941==at 0x4C3053B: ??? (in
/usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==26941==by 0x6E0ED1E: QMetaObjectPrivate::connect(QObject const*, int,
 QMetaObject const*, QObject const*, int, QMetaObject
const*, int, int*)
 (qorderedmutexlocker_p.h:83)
==26941==by 0x6E0F677: QObject::connect(QObject const*, char const*,
QObject const*,
 char const*, Qt::ConnectionType) (qobject.cpp:2713)
==26941==[...]
==26941== 
==26941== 

Is this something I should worry about?

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer




smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Signed return type of QIODevice::pos() - why?

2014-11-13 Thread Rainer Wiesenfarth
One of my colleagues just asked the rather philosophical question why the
result of QFile::pos() - and thus QIODevice::pos() - is of type qint64 (and
thus signed). He had expected an unsigned type, ideally size_t or offset_t.

I was unable to find a reason, but maybe someone on the list can step in?

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] List of QT_... defines?

2014-10-30 Thread Rainer Wiesenfarth
We just came along the question if there is a per-version list of QT_...
defines that could be used when building applications based on Qt.

I know that in 5.3.2 there is QT_NO_CAST_FROM_ASCII, mentioned in the
QString docs, I saw QT_DISABLE_DEPRECATED_BEFORE on the QtGlobal page and
I know about some others. However, some defines used in earlier versions
(our software reaches back to the time of Qt 2.x) like QT_THREAD_SUPPORT are
no longer used.

Is there any central place for all defines supported by this version of
Qt?

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QCoreApplication crashes

2014-10-24 Thread Rainer Wiesenfarth
Am 20.10.2014 07:12, schrieb Tamás Nagy: Hi
 
 #include QtCore
 //#include qtconcurrentrun.h
 #include QThread
 #include QList
 #include QObject
 #include QException
 
 #include iostream
 
 #include inputthread.h
 #include multiplierthread.h
 #include myobject.h
 
 using namespace std;
 
 int main(int argc, char *argv[])
 {
  QCoreApplication a(argc, argv);
  return a.exec();
 }
 [...]

Looks like a problem with static initialization. Any static objects in
inputthread.h, multiplierthread.h, myobject.h or the related files? What
happens if you comment your includes, one by one?

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Writing Canonical XML in Qt5

2014-10-14 Thread Rainer Wiesenfarth

Am 15.10.2014 02:26, schrieb matt.bol...@csiro.au:

Any suggestions for the best cross platform way to write canonical xml
files under Qt5 (http://en.wikipedia.org/wiki/Canonical_XML). The
complete randomness of QHash makes any sort of diff tool comparison
impossible [...]


Is QMap an alternative for your QHash? Of course, you will lose 
performance on insertion and lookup.


An other approach might be to get the QHash::keys(), sort them and use 
the result to iterate over the QHash when writing the XML file.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMutex and QTimer timeout

2014-10-06 Thread Rainer Wiesenfarth

Am 06.10.2014 22:23, schrieb Francisco Ares:

I'm trying to implement a serial communication class.  Under certain
conditions, I would like to send a message, then keep the thread locked
until some specific answer arrives, then the thread could be unlocked.

While testing the connection, the lock (using a QMutex for this) may
lock forever if the connection is opened, so I have implemented a single
shot QTimer so that the thread could have an exit point when this timer
period times out.

But it does not work.

The QMutex and the QTimer are on the same thread.  Does QMutex locks the
thread so much?  Any advice?


For what I can tell based on your information, QWaitCondition might help 
you.


If not, you might have to give us some source code of what you are 
trying to do.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Event handling for QObjects created before QApplication

2014-09-23 Thread Rainer Wiesenfarth

Am 24.09.2014 03:20, schrieb Hamish Moffatt:

Does that mean static objects are not supported either?


I would assume so, yes, as long as you think of static *QObjects*. All 
non-QOject derived classes should also be usable for static instances.


But I would be careful with complex classes which might have QObject 
derived members - although I can't think of one at the moment.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Input Validator

2014-09-17 Thread Rainer Wiesenfarth

Am 17.09.2014 17:11, schrieb Stephen King:

I'm a little confused with QML  TextInput with an int validator in Qt
4.7.4 (and maybe later). Given an int validator with a top of 128 and
bottom of -127, why is 07 acceptable but 08 not and likewise 028, 038
etc? I assume they're actually intermediate but I don't think I can
get that information from the QML.
[...]


I'd assume that the zero at the left is interpreted as leading prefix 
for an octal number. That'll explain why 07 is accepted while 08 is not.


Just for curiosity: is 0xf accepted? :-)

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Direct-lookup translation, even for English (was Re: get english translation)

2014-09-02 Thread Rainer Wiesenfarth
From: Rutledge Shawn
 Some projects like to use programmer shorthand for strings and then
leave
 the final text up to a different team. [...]

Well, you are able to do this with the Qt approach, too.

 [...] They wanted to have all the strings
 for all the languages inside the binary. [...]

What about adding the .qm files to a Qt resource file and constructing the
QTranslator from the byte array?

I do not say that the Qt approach fits it all, but I do not see a reason not
to use it for the case you described. Just my EUR 0.02 ...

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] get english translation

2014-09-01 Thread Rainer Wiesenfarth
From: Graham Labdon
 My application is internationalized, however, in some circumstances I need
 the English version of the string no matter what translator is being used.
 Anyone have any suggestions on how to achieve this?

One approach might be to subclass QTranslator and overwrite translate()
(snippet is untested!):

class MyTranslator : public QTranslator
{
public:
MyTranslator (QObject *parent = 0)
: QTranslator (parent)
, m_translation (true)
{ }

bool translation () const
{ return m_translation; }

void setTranslation (bool translation)
{ m_translation = translation; }

virtual QString translate (const char *context
, const char *sourceText
, const char *disambiguation = 0) const
{
return m_translation
? QTranslator::translate (context, sourceText, disambiguation)
: QString (sourceText);
}

private:
bool m_translation;
};

However, setting or clearing the m_translation flag affects _all_ strings
that are passed through the translator, which might be not what you need. Of
course, more sophisitcated solutions may use the parameters given to
translate to decide what should be done...

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] how to properly close a SQLite database?

2014-06-25 Thread Rainer Wiesenfarth
From: Bo Thorsen
 
 Den 25-06-2014 10:56, Francisco Ares skrev:
  Thanks, Constantin.
 
  Do you know if is it possible to have two QSqlDatabase objects (using
  SQLite driver, of course), in the same program?  I think I will make
  some tests with its clone function.
 
 You can do this with named connections. The difference is that usually we
 don't give a database connection a name, because there is only one.

Just to add: Take a look at the second parameter of
QSqlDatabase::addConnection() and read the Detailed Description of the
QSqlDatabase documentation. Doing so may make things more clear - like the
idea of having a default connection.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Simple UDP listener question

2014-06-24 Thread Rainer Wiesenfarth

Am 24.06.2014 10:38, schrieb Robert Wood:

Yes, Bob, that's exactly it.

On 192.168.0.18 I have stripped it right down to this this:


  udpSocRec = new QUdpSocket(this);
  udpSocRec-bind(QHostAddress::Any, 6454);

connect(udpSocRec, SIGNAL(readyRead()),this,
SLOT(processPendingDatagrams()));

processPendingDatagrams() never gets called, even when Wireshark on
192.168.0.18 shows this message:


246843  367.240816000   192.168.0.19192.168.0.18ARTNET  60  ArtPoll 
(0x2000)

When I get my laptop which is on 192.168.0.19 to send a packet out.

Wireshark also tells me this packet is:

User Datagram Protocol, Src Port: 6454 (6454), Dst Port: 6454 (6454)


What does netstat -an say when your UDP listener is running? You 
should find your app as UDP 0.0.0.0:6454 for IPv4 and/or as UDP 
[::]:6454 for IPv6.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Simple UDP listener question

2014-06-24 Thread Rainer Wiesenfarth

Am 24.06.2014 13:02, schrieb Robert Wood:

It says this:
udp0  0 0.0.0.0:64540.0.0.0:*

If I stop my app, that disappears, [...]


Ok, so your app can create the socket. Just to make sure: You _are_ 
running an event loop (Q{Core,}Application::exec())!?


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to speed-up chameleons

2014-06-12 Thread Rainer Wiesenfarth
From: igor.mironc...@gmail.com
 Ah, ok. I understand. You suggest to not use signals/slots and use semaphore 
 instead.
 
 Well. I think this will improve performance. But it will not use messaging 
 system of Qt :)

http://en.wiktionary.org/wiki/if_all_you_have_is_a_hammer,_everything_looks_like_a_nail
 ;-)
  
Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 5.3 OSX: Debugging failed

2014-06-05 Thread Rainer Wiesenfarth

Am 05.06.2014 21:49, schrieb Till Oliver Knoll:

[...]
Under Settings / Creation and Execution (Erstellen und Ausführen) in
the Debug tab I see:

* Automatically detected
   GDB from System in /usr/bin/gdb
   LLDB from System in /usr/bin/lldb
   LLDB from System in
/Applications/Xcode.app/Contents/Developer/usr/bin/lldb

In the Qt Versions tab I have only one entry (I deleted the stale Qt
5.2.1 entry manually):

* Automatically detected
   /Users/tknoll/Qt5.3.0/5.3/clang_64/bin/qmake
[...]


Never user Creator much, but just a guess: Does Automatically detected 
pick GDB while it should use LLDB? In this case manually selecting one 
of the LLDBs (the right one, versions may also matter?) should solve the 
problem.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Bug in Qt 4.8.5 (Windows/VS2010SP1): QPainter::drawRect() draws triangle instead of rect

2014-04-08 Thread Rainer Wiesenfarth

(filed at Digia as INC-205425)

The following code should show a black rectangle on a white background. 
However, on startup it shows something that might be a triangle (it is 
clipped to the window extent). If you increase the widgte size in X, as 
soon as the lower right corner of the rect is visible, the drawing is ok 
(and will stay so if you make the window smaller again).


I observed this problem with Qt 4.8.5 on Windows using VS2010SP1, and I 
_think_ I saw it on Linux, too (can't reproduce atm). The problem does 
not show with Qt 4.7.3.


A workaround is to draw the four lines instead of the rectangle. 
However, for filled rectangles you also have to draw the rect (with pen 
Qt::NoPen) to get the interior. Strange enough, the filling works ok...


Code to reproduce:

-8 main.cpp - 8-
#include QtGui/QApplication
#include QtGui/QWidget
#include QtGui/QPainter
#include QtCore/QRect

class DrawingWidget : public QWidget
{
public:
DrawingWidget () : QWidget ()
{ }

protected:
virtual void paintEvent (QPaintEvent *)
{
QPainterp (this);
QRect   r;

r.setCoords (100, -200, 1000, 200);
p.fillRect (0, 0, width (), height (), Qt::white);
p.setPen (Qt::black);
p.drawRect (r);
}
};


int main (int argc, char *argv[])
{
QApplicationapp (argc, argv);
DrawingWidget   dw;

dw.resize (300, 300);
dw.show ();
return app.exec();
}
-8 EO main.cpp - 8-

-8 rectDraw.pro - 8-
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .

# Input
SOURCES += main.cpp
-8 EO rectDraw.pro - 8-

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] PDF to QByteArray

2014-02-25 Thread Rainer Wiesenfarth

Am 26.02.2014 04:02, schrieb Marcelo Estanislau Geyer:

It's possible load pdf file to QByteArray? The simple code below is not
work:

QFile file(/home/marcelo/Documents/test.pdf);
if (!file.open(QIODevice::ReadOnly)) {
qDebug()  file open error;
return;
}

QByteArray ba_pdf = file.readAll();
qDebug()  ba_pdf;
file.close();

The output is:
%PDF-1.4
1 0 obj

/Title (þÿ)
/Creator (þÿ)
/Producer (þÿ


As you did not tell what you expected, I guess the character encoding 
differs, and the strings for /Creator, /Producer, ... should look different.


You might give this snippet a try:

QFile file(/home/marcelo/Documents/test.pdf);
if (!file.open(QIODevice::ReadOnly)) {
qDebug()  file open error;
return;
}

// QByteArray ba_pdf = file.readAll();
// qDebug()  ba_pdf;
QTextStream ts(file);
ts.setCodec (UTF-8);
QString s_pdf = ts.readAll();
qDebug()  s_pdf;

file.close();

The UTF-8 might need to be replaced by something else, depending on 
the encoding your file uses.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Correcting deployment linkages in Linux shared libraries

2013-12-03 Thread Rainer Wiesenfarth

Am 04.12.2013 05:58, schrieb Thiago Macieira:

On terça-feira, 3 de dezembro de 2013 19:51:44, Bob Hood wrote:

[...]
However, the plug-in shared libraries don't seem to be adhering to this
redirection mechanism.  If I deploy to a clean installation of my Linux
distribution, the shared libraries have changed their linkages to the Qt
version found in /usr/lib64 (which, in this case, is 4.6.2) instead of using
those in the folder with them.  I discovered using the ldd tool.

Is there a post-build action I need to perform to fix these linkages, like
the install_name_tool utility under OS X?  If not, how do I get these
plug-ins to use the Qt deployed with them?


Post-build? No.

Add an -rpath $ORIGIN [...]


What we did in addition for our software is to add these options to the 
Qt configure:


  -buildkey namexyz -no-rpath -R $ORIGIN

This was used to prevent 'our' QtCore4.so (?) from loading 
system-installed plugins that in turn tried to use a different version 
of the Qt shared objects.


Thiago, please comment on this if it happens to be complete nonsense... :-)

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Correcting deployment linkages in Linux shared libraries

2013-12-03 Thread Rainer Wiesenfarth

Am 04.12.2013 07:25, schrieb Thiago Macieira:

On quarta-feira, 4 de dezembro de 2013 06:20:45, Rainer Wiesenfarth wrote:

What we did in addition for our software is to add these options to the
Qt configure:

-buildkey namexyz -no-rpath -R $ORIGIN

This was used to prevent 'our' QtCore4.so (?) from loading
system-installed plugins that in turn tried to use a different version
of the Qt shared objects.

Thiago, please comment on this if it happens to be complete nonsense... :-)


That only applies to Qt's own build. It does not apply to your libraries,
plugins and executables. You need to add the $ORIGIN yourself, in your .pro
files.


That's why I wrote ... in addition ... ;-)

I think there was an issue with conflicting Qt versions when we omitted 
the -buildkey option.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Segfault: qHash(QString const) in libQtCore.so.4

2013-10-06 Thread Rainer Wiesenfarth

Am 02.10.2013 18:37, schrieb Thiago Macieira:

On quarta-feira, 2 de outubro de 2013 17:26:21, Peter Smith wrote:

Hi all,

I'm having problems with QGIS seg faulting, and it looks like the
problem is in QT (hence posting on this list):


No, it isn't.


I'd say: Yes, there might be (note the version (4.6.2) he is using).

There was a race condition issue with QString and QHash involved in 
versions up to 4.8.x which had to do with the Latin1 and ASCII 
conversion of QStrings.


If you are using multiple threads, it might be an approach to verify the 
problem with a more recent version of Qt.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QTcpServer stop accepting connections

2013-09-05 Thread Rainer Wiesenfarth
From: Benjamin Zeller
 Ok i just found out what the problem is.
 Its a feature of chrome and firefox, they only open a few connections to
a
 server and reuse them later.
 
 Means even if i send 20 requests the browser will split them into bunches
of
 6.
 [...]

To change this behavior for Firefox:
- go to about:config
- change the value for network.http.max-persistent-connections-per-server
- if necessary, change also network.http.max-connections and
  network.http.max-persistent-connections-per-proxy

... but do not blame me for any performance penalty you might get! :-)

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QThread and QPixmap::grabWindow()

2013-08-07 Thread Rainer Wiesenfarth

Am 08.08.2013 00:11, schrieb Alexander Syvak:

[...]
auto const this_thread = this-thread ();
moveToThread (QApplication::instance()-thread());
screenshot = QPixmap::grabWindow( QApplication::desktop()-winId() );
moveToThread(this_thread);
[...]


I think you might have a problem in understanding threads and the thread 
context as used in Qt. moveToThread() does NOT change the thread the 
current code runs in! It only changes the target for events sent to this 
object.


In your example, the thread that executes this-thread() is identical to 
the one that executes QPixmap::grabWindow().


You will have to implement synchronization between the main (GUI) thread 
and your workers. The workers send an event to the main thread each time 
they need a screenshot, the main thread picks up the event, takes the 
screenshot and sends an event back to the caller. The addressed worker 
thread then picks up this event and processes the screenshot.


If you have only one worker, you might wrap up your processing in a 
single method and use QtConcurrent::run().


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QStackedWidget and QListView

2013-07-29 Thread Rainer Wiesenfarth
From: Alexander Syvak
 However, the result is ...

QListView has a default size policy of Expanding, thus keeping the initial
designed size on resize as long as possible. QStackedWidget has a size
Policy of Preferred, which allows shrinking it to zero width. If you
resize you dialog, your stacked widget will appear. 

Using Qt Designer 4.7.3 (the version I had available) there seems to be no
other option than specifying a minimum width for the QStackedWidget or
adding widgets to it. Setting a size for QListView does not work.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QPainter, elastic rectangles

2013-07-29 Thread Rainer Wiesenfarth
From: Alexander Syvak
 Look at the next piece of code
 
 void event_dlg::create_pattern() 
 {
 qDebug()  create_pattern() slot's been called!;
 pattern_qualifier ptrn_qualifier_wdg(this);
 ptrn_qualifier_wdg.setWindowFlags(Qt::FramelessWindowHint|Qt::Popup);
// ...
 auto const full_screen_rect =
QApplication::desktop()-screenGeometry(); // ...
 ptrn_qualifier_wdg.setGeometry(full_screen_rect);
 ptrn_qualifier_wdg.showMaximized();
 int usr_anwer = ptrn_qualifier_wdg.exec();
 }
 The event_dlg is of type QDialog. The pattern_qualifier may be anything
from QWidget, QDialog, QMainWindow.
 
 #1. When it inherits QWidget it's not visible or it's not even started. I
don't understand this.
 
 #2. When it inherits QDialog without Qt::Popup flag set, the event_dlg
window is blocked except the title bar thereof.
 #3. After the Qt::Popup flag is set it is shown and it works.
 
 Why in #1 it's not shown at all?

QWidget does not have a method exec(), how do you manage to compile it?

 Why in #2 it's blocking its parent but not visible

QDialog is application modal by default, i.e. you application's event loop
is blocked until the dialog closes.

 Why in #3 it's working fine with Qt::Popup?

Hmm, no idea for this one.

To solve your problem, you might refer to the Code Examples section of the
QDialog documentation.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Hiding a shared lib? Linux of course.

2013-07-05 Thread Rainer Wiesenfarth

Am 05.07.2013 08:59, schrieb Till Oliver Knoll:

[...]
If the whole purpose was to deploy a given application on Linux (rather
than, say, compile Qt 5  and install it under /usr/lib for general
use), then

A) I could compile Qt myself (- make sure that no existing system
plugins from e.g. KDE are pulled in, which on their turn could pull in
an older/different Qt version)

B) Deploy that Qt compile with my application
(/opt/MyApp/[bin|lib|resources|...] - or wherever would be the
appropriate location for application bundles on Linux these days)

[...]
That should work on Linux, too - right?


It does - almost. At least for Qt 4.x you had to configure your 
personal Qt with -buildkey ... to avoid base library version 
conflicts with automatically loaded system plugins (your app / your Qt 
.so files(?) automatically load system plugins which in turn want to 
load Qt .so files of a different version or configuration).


I do not know if this still is required for Qt 5.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt i18n with large project

2013-06-17 Thread Rainer Wiesenfarth
I am searching for some best practices for using lupdate, lrelease and
linguist for a large project. Our project consists of some 300 Visual Studio
projects (no qmake .pro files), which we would like to combine in a single
.qm file per language. At the moment, the total number of strings is about
15.000.

There are some issues I have to address. The first on is the collection of
the strings (lupdate). As we are not using qmake, I would have to feed the
path(s) into lupdate. I could add the top-level directory, but this will
include any strings in test and demo programs, which we do not want to
include in translations. On the other hand, I may list all the files in a
listfile to be used with lupdate, but this requires keeping the list file up
to date. My first approach was to run lupdate separately for each project,
updating the .ts files only partially. However, I cannot tell lupdate NOT to
mark entries as obsolete.

A second issue is concurrent translations that may lead to merge conflicts
in SVN. Of course, this (and the above) problem can be solved by using one
.ts file per project. However, with this approach the translators for one
language will be faced with 300 files to be translated and the overall
number of .ts files will reach the thousands.

Does anyone out there has some experience in i18n with large projects and
can share some hints or best practices?

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer




smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: questions regarding huge projects

2013-04-23 Thread Rainer Wiesenfarth
Thanks a lot for all your hints and links! I get the feeling that I can 
easily spend a week learning the secrets of qmake. :-)


My first impression is that qmake probably will suit fine, without 
introducing the complexity of cmake. But it definitely will be the 
second build system (for non-Windows builds only) - at least unless a 
new Visual Studio version does no longer support our VS2010 project files.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qmake: questions regarding huge projects

2013-04-19 Thread Rainer Wiesenfarth
I would like to ask for some expert tutorial or some hints for using 
qmake with huge projects.


What is huge? Our complete package consists of 50 applications build 
based on 100 libraries (organized in modules and units). On Windows, we 
use a Visual Studio solution file containing 250 projects, the 
application projects use Properties / Framework and References to 
refer to those libraries needed for this specific application.


Now I would like to setup build system on Linux for a part of our 
package. Currently we use a own Makefile based approach that has some 
disadvantages. What I would like to have is a solution based on qmake 
(ideally) that satisfies these conditions:


- if an application A depends on a library B, it is sufficient to define 
this only once (needs), not multiple times (depends on + build 
after + link with + ...)


- if I build a single application, only those libraries are build that 
are needed for this application


- if the whole package is build, each library is ideally built only once

- build steps run in parallel on multiple cores

Could anyone of you point me to examples or docs that might help me to 
find this solution?


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: questions regarding huge projects

2013-04-19 Thread Rainer Wiesenfarth

Am 19.04.2013 10:35, schrieb Mandeep Sandhu:

[...]
The single application's pro file should have all the libs it depends
on, listed in the depends variable.


Thanks for your answer, I will take a look at depends - I did not yet 
read in depth about its meaning and impact.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: questions regarding huge projects

2013-04-19 Thread Rainer Wiesenfarth

Am 19.04.2013 11:25, schrieb Bo Thorsen:

Sounds to me like you want to switch to cmake instead. That has a lot
better support for dependencies between subprojects than qmake. And for
a project of this size, I would expect you have some fancy build stuff
in there as well, and qmake is usually too simple for it.


Hi Bo,

well, I know about cmake, but was going for something less cryptic... :-)

We have some fancy build stuff (f2c, versioning, ...), but I was hoping 
to get it done with qmake, _because_ it is simple.


Probably I have to dig through QMake Variables and QMake Functions 
to find the features I need.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: questions regarding huge projects

2013-04-19 Thread Rainer Wiesenfarth

Am 19.04.2013 13:36, schrieb Bo Thorsen:

On the bright side: Once you have a good cmake build in place, you will
have the visual studio build done with the same system as Linux. Having
two different build systems is *not* a good idea.


I know, but we will definitely have two build systems - unless there is 
a cross-platform MSBuild / devenv ... :-)


Our almost exclusive development environment is and will remain Visual 
Studio, so any initial changes to projects or solutions are done 
inside VS. Building the software on Linux is done far less often, so 
re-adjusting the build files is a tolerated approach.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Oops! Somebody's got a bad case of dependency bloat!

2013-04-10 Thread Rainer Wiesenfarth

Am 10.04.2013 13:45, schrieb Allan Sandfeld Jensen:

Perl, Python and Ruby, that is just the webkit build dependencies. Not much Qt
can do about that.


So, I do not need those if I configure Qt without webkit?

... ah, I forgot, there is a -no-widgets configure option, but no 
-no-webkit... :-(


Seems all other commercial customers (other than my collegues and me) 
are not using Qt mainly for desktop applications...


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Oops! Somebody's got a bad case of dependency bloat!

2013-04-10 Thread Rainer Wiesenfarth

Am 10.04.2013 14:27, schrieb John Layt:

On 10 April 2013 13:14, Rainer Wiesenfarth
rainer_wiesenfa...@trimble.com mailto:rainer_wiesenfa...@trimble.com
wrote:

So, I do not need those if I configure Qt without webkit?

... ah, I forgot, there is a -no-widgets configure option, but no
-no-webkit... :-(


On the contrary, as documented at
http://qt-project.org/wiki/Building_Qt_5_from_Git under the Getting the
source code section we have documented for the init-repository script:

--no-webkit : Consider skipping qtwebkit by passing this option. [...]


Would be great if configure --help would also know about the secret 
options...


Note: I do not build from git, but from the commercial package.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt Service Framework in Qt 5 Latest Release

2013-03-11 Thread Rainer Wiesenfarth

Am 11.03.2013 21:45, schrieb Miller, Doug:

I'm using the Qt Service Framework in-process plug-in on Linux an
Windows.  It works fine on Linux, but on Windows I get this run-time
error:

QServiceManager::addService() serviceframework_abcplugin - .DLL
: The plugin '.DLL' uses incompatible Qt library. (Cannot mix debug
and release libraries.)  - Aborting registration Failed to add
service from 'abc.xml'

Qt related libs were built in debug and release mode.

When the application was built in debug mode everything works, but
when built in debug the above problem happens.


I assume application and service have to be both compiled with the same 
configuration, i.e. either both in debug mode or both in release mode.


Another option might be to adjust your project settings so that both 
debug and release mode of the application and the service use the 
release version of Qt and the release runtime libraries - but that 
depends on what you would like to be able to debug.


And yes, debug vs. release runtime _is_ nasty on Windows...

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Building Qt 5.0.1 on Windows using VS2010 fails

2013-03-05 Thread Rainer Wiesenfarth

I configured Qt 5.0.1 with

configure.bat -release -commercial -c++11 -shared \
  -no-ltcg -nomake demos -nomake examples \
  \
  -no-accessibility \
  \
  -qt-sql-sqlite -opengl desktop \
  -qt-zlib -qt-libpng -no-libjpeg -no-openssl -no-dbus \
  -mp -confirm-license

When I try to nmake Qt, I get the errors below on linking Qt5Gui.lib.
Do I have to remove the -no-accessibility switch from configure? 
However, I built Qt 5.0.0 with the same configure options (plus -fast, 
which seems to be no longer supported).


link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /DLL 
/VERSION:5.01 /MANIFEST /MANIFESTFILE:..\..\lib\Qt5Gui.dll.embed.
manifest /OUT:..\..\lib\Qt5Gui.dll 
@C:\Users\rwiesen\AppData\Local\Temp\nm44DE.tmp

   Creating library ..\..\lib\Qt5Gui.lib and object ..\..\lib\Qt5Gui.exp
qguiapplication.obj : error LNK2019: unresolved external symbol public: 
static struct QMetaObject const QAccessible::staticMetaObject 
(?staticMetaObject@QAccessible@@2UQMetaObject@@B) referenced in function 
public: static class QString __cdecl QAccessible::tr(char const *,char 
const *,int) (?tr@QAccessible@@SA?AVQString@@PEBD0H@Z)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual struct QMetaObject const * __cdecl 
QAccessible::metaObject(void)const  
(?metaObject@QAccessible@@UEBAPEBUQMetaObject@@XZ)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual void * __cdecl QAccessible::qt_metacast(char const *) 
(?qt_metacast@QAccessible@@UEAAPEAXPEBD@Z)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual int __cdecl QAccessible::qt_metacall(enum 
QMetaObject::Call,int,void * *) 
(?qt_metacall@QAccessible@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual class QWindow * __cdecl QAccessibleInterface::window(void)const 
 (?window@QAccessibleInterface@@UEBAPEAVQWindow@@XZ)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual class QVectorstruct QPairclass QAccessibleInterface *,class 
QFlagsenum QAccessible::RelationFlag   __cdecl 
QAccessibleInterface::relations(class QFlagsenum 
QAccessible::RelationFlag)const  
(?relations@QAccessibleInterface@@UEBA?AV?$QVector@U?$QPair@PEAVQAccessibleInterface@@V?$QFlags@W4RelationFlag@QAccessibleV?$QFlags@W4RelationFlag@QAccessible@Z)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual class QAccessibleInterface * __cdecl 
QAccessibleInterface::focusChild(void)const  
(?focusChild@QAccessibleInterface@@UEBAPEAV1@XZ)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual class QColor __cdecl 
QAccessibleInterface::foregroundColor(void)const  
(?foregroundColor@QAccessibleInterface@@UEBA?AVQColor@@XZ)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual class QColor __cdecl 
QAccessibleInterface::backgroundColor(void)const  
(?backgroundColor@QAccessibleInterface@@UEBA?AVQColor@@XZ)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual void __cdecl QAccessibleInterface::virtual_hook(int,void *) 
(?virtual_hook@QAccessibleInterface@@UEAAXHPEAX@Z)
qguiapplication.obj : error LNK2001: unresolved external symbol public: 
virtual class QAccessibleInterface * __cdecl 
QAccessibleEvent::accessibleInterface(void)const  
(?accessibleInterface@QAccessibleEvent@@UEBAPEAVQAccessibleInterface@@XZ)
qguiapplication.obj : error LNK2019: unresolved external symbol public: 
static void __cdecl QAccessible::updateAccessibility(class 
QAccessibleEvent *) 
(?updateAccessibility@QAccessible@@SAXPEAVQAccessibleEvent@@@Z) 
referenced in function public: static void __cdecl 
QAccessible::updateAccessibility(class QObject *,int,enum 
QAccessible::Event) 
(?updateAccessibility@QAccessible@@SAXPEAVQObject@@HW4Event@1@@Z)

..\..\lib\Qt5Gui.dll : fatal error LNK1120: 12 unresolved externals

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QtConcurrent programming need help

2012-09-28 Thread Rainer Wiesenfarth

Am 28.09.2012 08:48, schrieb Sujan Dasmahapatra:

My CPU no is 8...Can u give me some code snippet dear Philippe and
Thiago. Thanks Sujan


Look here: http://qt-project.org/doc/qt-4.8/qtconcurrentmap.html

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Tel.: +49 (0)711 22 88-10  *  Fax: +49 (0)711 22 88-111
Web: http://www.trimble.com/geospatial/  *  http://www.inpho.de/
Trimble Germany GmbH  *  Branch office Stuttgart
Rotebühlstraße 81  *  70178 Stuttgart  *  Germany
Commercial register: HRB 83893, Darmstadt
Managing Directors: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] What did I do?

2012-09-04 Thread Rainer Wiesenfarth

Am 05.09.2012 07:11, schrieb K. Frank:

On Tue, Sep 4, 2012 at 6:37 PM, Bill Crocker ... wrote:
 In my app, when I click in a section of the horizontal header a table view,
 all items in the corresponding column are selected.

I see the same behavior.  (To confirm: using QTableView.)
[...]
I assume that it's the default behavior, because I don't do anything
explicit to enable it.

 How do I turn off this behavior?


If - and only if ;-) - setting

  view-setSelectionBehavior (QAbstractItemView::SelectItems);

does not help, this _might_ be an option:

1) Create a custom selection model class where you overload the two 
select() methods:


class MySelectionModel : public QItemSelectionModel
{
public:
MySelectionModel (QAbstractItemModel *model)
: QItemSelectionModel (model)
{ }
MySelectionModel (QAbstractItemModel *model, QObject *parent)
: QItemSelectionModel (model, parent)
{ }

virtual void select (const QModelIndex index
, QItemSelectionModel::SelectionFlags command)
{
command = ~QItemSelectionModel::Columns;
QItemSelectionModel::select (index, command);
}

virtual void select (const QItemSelection selection
, QItemSelectionModel::SelectionFlags command)
{
command = ~QItemSelectionModel::Columns;
QItemSelectionModel::select (selection, command);
}
};


2) Assign an instance of this selection model to your view:

view-setSelectionModel (new MySelectionModel (view-model ()));


Maybe you have to play a little with your selection model. You might 
also want to play with different settings of SelectionBehavior and/or 
SelectionMode.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Tel.: +49 (0)711 22 88-10  *  Fax: +49 (0)711 22 88-111
Web: http://www.trimble.com/geospatial/  *  http://www.inpho.de/
Trimble Germany GmbH  *  Branch office Stuttgart
Rotebühlstraße 81  *  70178 Stuttgart  *  Germany
Commercial register: HRB 83893, Darmstadt
Managing Directors: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


  1   2   >