[Qt-creator] Question about "Fetch data dynamically" option in new file wizard

2021-05-18 Thread Murphy, Sean
I'm creating a model class for a large table, so I would like to use lazy 
loading. 

1. In Qt Creator, I right-click my project and select the "Add New..." option.
2. In the new file creation wizard that pops up, I select the "Qt" option from 
the "Files and Classes" list, and then select the "Qt Item Model", then 
pressed
the "Choose..." button.
3. On the next page, I enter my desired class name, select 
"QAbstractTableModel" 
as the base class and then ensure the "Customize header row" and 
"Fetch data dynamically" checkboxes are checked.
4. I then completed the remaining steps in the wizard.

In the resulting class's header file, I only ended up with these functions 
defined for me:
explicit viewRawDataTableModel(QObject *parent = nullptr);
QVariant headerData(int section, Qt::Orientation orientation, int role = 
Qt::DisplayRole) const override;
int rowCount(const QModelIndex  = QModelIndex()) const override;
int columnCount(const QModelIndex  = QModelIndex()) const override;
QVariant data(const QModelIndex , int role = Qt::DisplayRole) const 
override;

I kind of expected that in addition to those functions above, the process would 
have also added functions like:
  virtual bool canFetchMore(const QModelIndex ) const;
  virtual void fetchMore(const QModelIndex );

Is this a bug, or am I just misunderstanding what that "Fetch data dynamically" 
checkbox 
is supposed to do when generating a new class?

Qt Creator 4.14.2

Sean 

___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] ** Caution Message may be spoofed ** Re: Find references of virtual functions?

2020-09-14 Thread Murphy, Sean
> Note that if such feature was implemented and you could find all places where
> your target overload is certainly called, there would be other call sites 
> where it
> *might* be called and this is what "find all references" is trying to show.

Yep, agreed. And I'd be ok with that if both (or maybe more) search options 
were 
available.  But the issue I'm running into currently is it showing me places 
where 
the overload I currently care about CAN'T POSSIBLY be getting called, but 
because 
of how the search pane only shows the single result line I can't tell for sure 
without 
clicking on each one and evaluating. My updated example this morning better 
describes my hierarchy:
  class AbstractShape
  -- class Polygon : public AbstractShape
   class Square : public Polygon
   class Triangle : public Polygon
  Assume all classes have a function called area(), with AbstractShape::area() 
= 0.

In this case a Square can never be a Triangle and vice versa, but if I put the 
cursor in 
the definition of Square::area() in square.cpp, and find all references, the 
search results 
show me Triangle::area() in triangle.h/.cpp, other calls to Triangle::area() 
within 
triangle.cpp as well as all instances where elsewhere in the codebase we have 
something like: 
  Triangle t;
  t.area();
Or
  Triangle * t = dynamic_cast< Triangle *>(abstractShape);
  if(t) { t->area;}
But indeed, that is what Qt Creator currently does.

Basically if at search time I could specify between:
1. Give me all of them (Qt Creator's current behavior). So I get AbstractShape, 
Polygon, Square, and Triangle results, same as today.
2. Give me only the ones that DEFINITELY are my inherited classes version, even 
if that 
means I miss all the ones that MIGHT be. Which in this specific use case would 
work 
perfectly for me because it appears we don't seem to be doing much of 
Giuseppe's 
example (updated for today's example classes):
  AbstractShape *blah = getShape();
  blah->area();
Instead we seem to be doing more of
  Triangle * t = dynamic_cast< Triangle *>(abstractShape);
  if(t) { t->area;}
So for this one, I'd only get Square results - AbstractShape, Polygon, and 
Triangle instances would be excluded.
3. Give me all that DEFINITELY are my inherited class plus all that MIGHT be 
(so 
Giuseppe's example), but exclude any that definitely AREN'T. So for this one, I 
get the Square, AbstractShape, and Polygon, but ones that are definitely 
Triangle are 
excluded. 

Option 3 honestly seems like a better default behavior if you start your search 
in one 
of the inherited classes than what Qt Creator is currently doing. 

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] ** Caution Message may be spoofed ** Re: Find references of virtual functions?

2020-09-14 Thread Murphy, Sean
> > Anyhow, given it's a virtual, how can you know at compile time if
> > you're calling GrandChild::foo() or not?
> >
> > Abstract *blah = getFoo();
> > blah->foo(); // might call Grandchild::foo(), or not
> 
> FWIW, there are at least 3 cases when it is certainly known at compile time
> which overload is called:
> 
> 1) if object is referenced by value:
> 
>   Grandchild blah;
>   blah.foo();
> 
> 2) fully qualified method call:
> 
>   Grandchild *blah = getFoo();
>   blah->Grandchild::foo(); // or Base::foo() etc.
> 
> 3) when foo() is final in Grandchild:
> 
>   Grandchild *blah = getFoo();
>   blah->foo();

Thanks Konstantin, for clarifying better than my initial post did. The 3 
examples 
above are exactly what I'm referring to. There are instances in the codebase 
where it should be pretty well determined at compile time which overload is 
going to get used, and I only want to see the ones that match for my use case 
(trying to find the impact of changing the behavior of just one of inherited 
classes' overloads).

But currently find all references doesn't give me the option to disregard ones 
that clearly can't be the one I'm trying to find. And because the Search 
Results 
pane only gives the single line of code that contains the symbol, I often don't 
have enough context there to determine which overload is going to be called, 
forcing me to click on most of the search result entries to then manually 
evaluate whether that chunk of code is likely calling the broken function or 
not.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


[Qt-creator] Find references of virtual functions?

2020-09-11 Thread Murphy, Sean
Say I've got a class inheritance design like so:

class Abstract
{
  virtual void foo() = 0;
}

class Base : public Abstract
{
  virtual void foo();
}

class Child : public Base
{
  virtual void foo() override;
}

class Grandchild : public Child
{
  virtual void foo() override;
}

Is there any way in Qt Creator to only show me the places where 
Grandchild::foo() is called?  Right now, I'm finding that even if I go to 
grandchild.cpp, put my cursor on void Grandchild::foo(), and then select "Find 
Reference to Symbol Under Cursor", it shows me every instance of EVERY foo() 
called anywhere in the program, including the declarations/definitions of 
Abstract::foo(), Base::foo() and Child::foo(), which I don't care about at the 
moment.

Currently, Base::foo() and Child::foo() are behaving correctly, but I have a 
bug in Grandchild::foo(), so I'm trying to see the full impact of where 
Grandchild::foo() is called to see how big of a ripple effect I might create by 
changing its behavior.

Sean 





This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] Qt Creator debugging views question

2020-08-13 Thread Murphy, Sean
> > If I set a breakpoint on or above the "if" line, and then step using
> > the "Step Over" button, I see the cursor bounce around the "if" line a
> > couple times as I press it, and eventually based on the result of the
> > entire conditional I see I see the current line of code move into one
> > or the other sections. But how do I see the return values of each of
> > the individual isEmpty() calls, so I can see which one (or ones) was the 
> > culprit
> for whatever happened.
> 
> With gdb, the return value is only produced on 'Step Out' operations.
> 
> So you'd need to Step In () into each isEmpty() call, and Step Out
> () at anytime later, e.g. also immediately, would run until the
> function exits and also produce the return value.

So correct me if I'm wrong, but that means there's not really any way to 
evaluate return values for functions that are in libraries that you're using 
that 
don't have debug symbols, correct? In my example, I just used QStrings, but 
in reality I'm talking about more complex situations. But without debugging 
symbols, I don't think you can step into a function - instead, gdb will just 
step 
over?

Instead you'd have to do something like the following, and check the 
individual lines prior to the conditional:

QString a;
QString b;
QString c;
// ... a bunch of code that manipulates the above strings

// check individual values here
bool aEmpty = a.isEmpty();
bool bEmpty = b.isEmpty();
bool cEmpty = c.isEmpty();

if(a.isEmpty() || b.isEmpty() || c.isEmpty()) {
  // do something
} else {
  // do something else
}

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


[Qt-creator] Qt Creator debugging views question

2020-08-11 Thread Murphy, Sean
When debugging code, is there a way to see the return values of individual 
calls within a complex conditional? For example, if I've got the following code:

QString a;
QString b;
QString c;
// ... a bunch of code that manipulates the above strings
if(a.isEmpty() || b.isEmpty() || c.isEmpty())
{
  // do something
} else {
  // do something else
}

If I set a breakpoint on or above the "if" line, and then step using the "Step 
Over" button, I see the cursor bounce around the "if" line a couple times as I 
press it, and eventually based on the result of the entire conditional I see I 
see the current line of code move into one or the other sections. But how do I 
see the return values of each of the individual isEmpty() calls, so I can see 
which one (or ones) was the culprit for whatever happened.

I feel like this has to be possible in Qt Creator, but I just don't know what 
the option is called, or what view I need to enable, or what buttons I need to 
click/check/whatever to get it to happen!

Sean 




This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] Issue compiling for Android, compiler not found

2020-05-07 Thread Murphy, Sean
> Next time you can use this setup_android.cmake [1] script that should
> download everything you need (Java JDK, Android SDK, Android NDK) to get
> started with Android development.
> 
> It takes a few minutes and works on all desktop platforms Windows / Linux /
> Mac.

Are you referring specifically to developing Qt apps for Android, or just 
Android 
development in general? My Android development setup was fine, I was able to 
develop non-Qt apps for Android without any issue. I just couldn't get Qt 
Creator 
to be happy with the setup, nor could I get Qt Creator to download what it 
needed to to fix everything, at least not until I rebooted.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] Issue compiling for Android, compiler not found

2020-05-06 Thread Murphy, Sean
> this looks like https://bugreports.qt.io/browse/QTCREATORBUG-23829
> 

It could have been, I'm not really sure. I spent all day yesterday attempting 
to resolve it (downloading SDKs/NDKs/other Android tools), all to no avail. 
Every time I went to that tab in the Options screen, that one item wasn't 
checked, I'd get the popup dialog asking me if I wanted Qt Creator to download 
the missing items (or whatever the message was, sorry I forgot exactly what 
that said), I would click the "Yes" button, the dialog would go away, but then 
nothing else occurred.

I finally got tired of messing with everything and just randomly decided to 
reboot my machine. I then relaunched Qt Creator, got the same dialog asking if 
I wanted to have Qt Creator fix everything, I said "Yes" again, and this time I 
got to a new dialog that told me that there were a couple of packages missing, 
then I had to answer yes to a couple license questions, and then it installed 
them.

At that point, I finally had a working system and I'm now able to compile for 
android.

I wish I had taken better notes of exactly what I did, but I really feel like 
it was the reboot that fixed it somehow. I know the last thing I did before 
rebooting was monkeying around in Qt Creator's settings, and it still wasn't 
saying I had a working setup, and then I rebooted, and immediately went back 
into Qt Creator and this time it downloaded.

One other thing I can think of is that I did have Android Studio open prior to 
the reboot, but closed after the reboot. I don't know if Android Studio had a 
file lock on something that then Qt Creator couldn't access? That's really the 
only thing I can think of that might be related.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


[Qt-creator] Issue compiling for Android, compiler not found

2020-05-05 Thread Murphy, Sean
I'm trying to build a Qt project for Android, and I seem to have something 
wrong with 
my setup, but for the life of me I can't understand what else I need to do.

Here's what I think are the relevant details, but let me know if I'm missing 
something critical:
 - Qt Creator version 4.12.0

- JDK location:  C:\Program Files\Java\jdk1.8.0_241
   Qt Creator reports "Java Settings are OK."

 - Android SDK location: C:\Users\smurphy\AppData\Local\Android\sdk
 - Android NDK list: 
   C:\Users\smurphy\AppData\Local\Android\sdk\ndk\21.0.6113669
   C:\Users\smurphy\AppData\Local\Android\sdk\ndk\21.1.6352462

Qt Creator reports that Android settings have errors, and the only item that 
has the red 'X' next to it is the "All essential packages installed for all 
installed Qt Versions", all other items in the Android section have the green 
check next 
to them. 

I think that the one failure is because I've got older versions of Qt installed
(5.9.6 and Qt 5.3.2), but I'm not 100% sure because then when I move over to 
look at the 
Kits, these three auto-detected kits below all have the yellow warning icon 
next to them and 
all claim that there is no compiler set on them. 
- Three relevant auto-detected kits that all claim to be missing a compiler:
  Android for arm64-v8a (Clang Qt 5.12.7 for Android ARM64-v8a)
  Android for armeabi-v7a (Clang Qt 5.12.7 for Android ARMv7)
  Android for x86 (Clang Qt 5.12.7 for Android x86)

I feel like I've followed the direction here, 
https://doc.qt.io/qt-5/android-getting-started.html, 
but I'm not able to build for Android.

Sean




This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] Error compiling: PlaceholderText is not a member of QPalette

2018-12-13 Thread Murphy, Sean
> I just had the same issue happen yesterday, which I reported as
> QTCREATORBUG-21698. The solution suggested by Friedemann is to use the
> Designer that came bundled with your Qt version, not the one integrated
> in Creator.
> 
> I don't agree with the assessment (I think the IDE should _never_ create
> invalid code for the selected toolchain), but at least it's a workaround.

Yep, my bug got closed as marked of a duplicate of yours and I agree with you 
completely about not agreeing with them! I don't think this behavior of designer
is remotely acceptable behavior for the IDE.

Sean



This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


[Qt-creator] Error compiling: PlaceholderText is not a member of QPalette

2018-12-13 Thread Murphy, Sean
I had an application that compiled just fine yesterday using Qt 5.9.6 and Qt 
Creator 4.7.x (sorry, can't remember the last digit, it might have been 2?). 
Today I made two changes before my next compilation attempt: I upgraded to Qt 
Creator 4.8.0 (revision d51ddbb8f0), and I edited my mainwindow.ui file in Qt 
Creator 4.8.0's form editor. Now when I attempt to compile I get multiple 
compile errors all of which are in the ui_mainwindow.h file, and all are:
   'PlaceholderText' is not a member of 'QPalette'

Not sure if any of the following details matter but here they are anyway:
- It only appears to be happening on two widgets, both of which are QLabel
- I didn't modify this widgets between yesterday and today other than changing 
their parenting hierarchy
- Both labels do have a customized palette and as far as I know are the only 
ones that have a custom palette on my app. <- this detail is probably important 
somehow.

It appears I can fix the issue by the following steps:
1. click on the QLabel
2. In the property editor pane, click the Change Palette button for the palette 
property
3. In the Edit Palette dialog, scroll down to the PlaceholderText color role, 
and hit the little arrow button that restores that color role to its default

Repeat steps 1-3 for the other label, save the .ui file, recompile and 
everything seems to be happy. So it appears that the current version of Qt 
Creator is incorrectly inserting a color role that doesn't exist for the Qt kit 
(5.9.6) I'm compiling with. I've reported this as 
https://bugreports.qt.io/browse/QTCREATORBUG-21715

I'm mostly tossing this here in case someone stumbles across the same issue, 
but if anyone has any thoughts on how to avoid this from happening in the first 
place, I'd appreciate it. From what I saw today, I think anytime I edit a .ui 
file that has any widgets with a customized palette, that Creator is going to 
update the .ui file incorrectly, and then I'm going to have to go back and fix 
it.

Sean

 


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] App crashes if signals come to fast in debug mode?

2018-12-12 Thread Murphy, Sean
> Open an issue on bugreports.qt-project.org and attach a debugger log
> (contents of right pane of Windows->Views->Debugger Log) there.

Here's the contents of the debugger log, it looks like it is crashing when 
attempting to find a Cygwin file 
("../../../../../src/gcc-5.3.0/libgcc/config/i386/cygwin.S: No such file or 
directory"). Let me know if you still think I should open it as a bug. 

I also have a minimal example that exhibits this behavior that I can upload 
somewhere if you want to take a look.

Sean

Debugger log:
t11:50:45.077 [13129ms]
sStarting debugger "GdbEngine" for ABI "x86-windows-msys-pe-32bit"...
t11:50:45.077
dStart parameters: 'threadedProgressDialogTest' mode: 1
dABI: x86-windows-msys-pe-32bit
dLanguages: c++ 
dExecutable: 
C:\Users\smurphy\Documents\TestProjects\build-threadedProgressDialogTest-Desktop_Qt_5_9_6_MinGW_32bit3-Debug\debug\threadedProgressDialogTest
 
dDirectory: 
C:\Users\smurphy\Documents\TestProjects\build-threadedProgressDialogTest-Desktop_Qt_5_9_6_MinGW_32bit3-Debug
dDebugger: C:\Qt_5.9.0\Tools\mingw530_32\bin\gdb.exe
dProject: C:\Users\smurphy\Documents\TestProjects\threadedProgressDialogTest
dAdditional Search Directories:
dSysroot: 
dDebug Source Location: 
t11:50:45.077
dDebugger settings:
dAdditionalArguments:   (default: )
dAdjustBreakpointLocations: true  (default: true)
dAllPluginBreakpoints: true  (default: true)
dAlwaysAdjustColumnWidths: true  (default: true)
dAutoDerefPointers: true  (default: true)
dAutoEnrichParameters: true  (default: true)
dAutoQuit: false  (default: false)
dBreakEvent:   (default: )
dBreakOnAbort: false  (default: false)
dBreakOnCatch: false  (default: false)
dBreakOnCrtDbgReport: false  (default: false)
dBreakOnFatal: true  (default: false)  ***
dBreakOnThrow: false  (default: false)
dBreakOnWarning: false  (default: false)
dBreakpointCorrection: true  (default: true)
dBreakpointsFullPath: false  (default: false)
dCDB_Console: false  (default: false)
dCloseBuffersOnExit: false  (default: false)
dCloseMemoryBuffersOnExit: true  (default: true)
dDisplayStringLimit: 100  (default: 100)
dEnableReverseDebugging: false  (default: false)
dExtraDumperFile:   (default: )
dFontSizeFollowsEditor: false  (default: false)
dGdbCustomDumperCommands:   (default: )
dGdbPostAttachCommands:   (default: )
dGdbStartupCommands:   (default: )
dIdentifyDebugInfoPackages: false  (default: false)
dIgnoreFirstChanceAccessViolation: false  (default: false)
dIntelFlavor: false  (default: false)
dLoadGdbDumpers2: false  (default: false)
dLoadGdbInit: true  (default: true)
dLogTimeStamps: true  (default: false)  ***
dMaximalStackDepth: 20  (default: 20)
dMaximalStringLength: 1  (default: 1)
dMultiInferior: false  (default: false)
dNoPluginBreakpoints: false  (default: false)
dQmlInspector.ShowAppOnTop: false  (default: false)
dRaiseOnInterrupt: true  (default: true)
dRegisterForPostMortem: false  (default: false)
dSelectedPluginBreakpoints: false  (default: false)
dSelectedPluginBreakpointsPattern: .*  (default: .*)
dShowQObjectNames2: true  (default: true)
dShowQmlObjectTree: true  (default: true)
dShowQtNamespace: true  (default: true)
dShowStandardNamespace: true  (default: true)
dShowThreadNames: false  (default: false)
dSkipKnownFrames: false  (default: false)
dSortStructMembers: true  (default: true)
dSourcePaths:   (default: )
dStationaryEditorWhileStepping: false  (default: false)
dSwitchModeOnExit: true  (default: false)  ***
dSymbolPaths:   (default: )
dTargetAsync: false  (default: false)
dUseAddressInBreakpointsView: false  (default: false)
dUseAddressInStackView: false  (default: false)
dUseAlternatingRowColours: false  (default: false)
dUseCodeModel: true  (default: true)
dUseDebuggingHelper: true  (default: true)
dUseDynamicType: true  (default: true)
dUseMessageBoxForSignals: true  (default: true)
dUsePythonDumper: true  (default: true)
dUseToolTips: true  (default: true)
dUseToolTipsInBreakpointsView: true  (default: false)  ***
dUseToolTipsInLocalsView: false  (default: false)
dUseToolTipsInStackView: true  (default: true)
dWarnOnReleaseBuilds: true  (default: true)
dWatchdogTimeout: 20  (default: 20)
t11:50:45.084 [7ms]
dState changed from DebuggerNotReady(0) to EngineSetupRequested(1) [master]
t11:50:45.084
dCALL: SETUP ENGINE
t11:50:45.084
dTRYING TO START ADAPTER
t11:50:45.084
dENABLING TEST CASE: 0
t11:50:45.084
dSTARTING C:/Qt_5.9.0/Tools/mingw530_32/bin/gdb.exe 
--tty=\\.\pipe\creator-12736-22442 -i mi
t11:50:45.088 [4ms]
dGDB STARTED, INITIALIZING IT
t11:50:45.089 [1ms]
<1608show version
t11:50:45.089
<1609show debug-file-directory
t11:50:45.089
<1610set print object on
t11:50:45.090 [1ms]
<1611set breakpoint pending on
t11:50:45.090
<1612set print elements 1
t11:50:45.090
<1613set unwindonsignal on
t11:50:45.091 [1ms]
<1614set width 0
t11:50:45.091
<1615set height 0
t11:50:45.091
sSetting up inferior...
t11:50:45.195
<1616set substitute-path C:/work/build/qt5_workdir/w/s 
C:/Qt_5.9.0/5.9.6/mingw53_32
t11:50:45.196 

Re: [Qt-creator] App crashes if signals come to fast in debug mode?

2018-12-11 Thread Murphy, Sean
> > When debugging an application within Qt Creator, is there any reason
> > that an application would crash by sending signals to a
> > QProgressDialog too quickly?
> 
> Depends on context, but, sure, it's imaginable.
> 
> An "Evaluated Expression"  malloc(100) + possibly actually
> writing to the memory would happily leak until the process
> runs out of memory.

I don't think I have anything like that going on other than the addition
of emitting that signal from a block of code in the programming thread
where I wasn't previously emitting it. So the difference between crashing 
and not crashing is simply whether or not the emit statement is commented
in or out in the pseudo code below, the  block below is being 
called always, only the addition of the signal emission causes the crash.

if(pageIsEmpty)
{
  
  emit sigPageProgrammed(currentPageNum, totalNumPages); 
}

> > If I rebuild the application in release mode, and run it either from
> > within Qt Creator (using CTRL+R) or run it outside Qt Creator
> > altogether it runs just fine without crashing, only crashing inside Qt
> > Creator and only in debug mode.
> 
> When debugging or running the application when compiled in debug mode?

The crash definitely occurs when debugging, no breakpoints are set though. I 
didn't 
attempt running the application outside of Creator/debugger with a debug build 
though. I'll try that tomorrow.

> 
> > So the only real difference I see is
> > that for the first 17% of programming, the signals are coming out
> > fairly slowly, after that, the next clump of signals are going to come
> > out much faster based on how quickly that programming thread can
> > determine that each of the remaining pages are empty.
> >
> > Any ideas?
> 
> Open an issue on bugreports.qt-project.org and attach a debugger log
> (contents of right pane of Windows->Views->Debugger Log) there.

I'll poke around some more tomorrow and see what I can turn up and if 
there's anything issue-worthy.

> 
> PS:
> 
> > tHIS MEssage has been scanned for malware by Forcepoint.
> 
> And what was the result?

No idea, but I'm guessing this message will be scanned too!


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


[Qt-creator] App crashes if signals come to fast in debug mode?

2018-12-11 Thread Murphy, Sean
First, not sure if this is really a Qt Creator question or a general Qt 
question, so feel free to suggest I move this over to qt-interest if you think 
it fits better there.

When debugging an application within Qt Creator, is there any reason that an 
application would crash by sending signals to a QProgressDialog too quickly?

The setup:
Our application programs a flash based device over the serial port. I have the 
programming object running in a separate thread from the GUI, and then there's 
a QProgressDialog in the main UI thread that shows the status of the 
programming. These two objects communicate via a signal: void 
sigPageProgrammed(int currentPage, int totalPageCount). We program the device 
in 256 byte pages, with 1024 pages total. As part of that programming process, 
we check to see if the page is "empty" (all bytes equal 0xff within a given 256 
byte block). If it's empty, we skip it to save time. I realized while testing 
that I was only emitting that sigPageProgrammed() signal when we actual wrote a 
page, and didn't emit anything when we get to skip an empty page. One of our 
devices only uses the first 180 pages, so when programming that device, the 
progress dialog increments from 0 to 17% and then doesn't increment anymore 
since the rest of the pages are blank.

So I figured I'd add code to emit that signal even on the empty pages just so 
that the progress bar will always see 0 to 100%, regardless of how many pages 
need to get programmed. Once I made that change, and I'm 100% sure that's the 
only change I made, the application now segfaults when running in debug mode at 
the following line in a slot that is connected to the above signal:
void MainWindow::slotProgrammingStatus(int current, int total)
{
if(mDlgProgrammingProgress->maximum() != total)
{
mDlgProgrammingProgress->setMaximum(total);
}
mDlgProgrammingProgress->setValue(current); // <- segfault happens here
qDebug() << "Programming page" << current << "of" << total;
}

If I rebuild the application in release mode, and run it either from within Qt 
Creator (using CTRL+R) or run it outside Qt Creator altogether it runs just 
fine without crashing, only crashing inside Qt Creator and only in debug mode.  
So the only real difference I see is that for the first 17% of programming, the 
signals are coming out fairly slowly, after that, the next clump of signals are 
going to come out much faster based on how quickly that programming thread can 
determine that each of the remaining pages are empty.

Any ideas?
Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator


Re: [Qt-creator] How to put custom build steps into Git?

2018-07-06 Thread Murphy, Sean
Yeah, that’s what my current .exe does, it grabs the information from Git and 
parses the previously existing version.h (if one exists), only over-writing 
that header file if the Git information has changed from what’s in the file. 
Thus preventing a recompile of the much larger .cpp file that includes the 
version.h file.

I also only put this in the Release target, as I really don’t care about this 
info when I’m building in debug mode. But that can be scoped in/out in the .pro 
file as well.

Sean Murphy
Sr. Project Engineer
Walbro LLC
4144 Doerr Rd
Cass City, MI 48726
ph. 989 872 7274
cell 734 223 8975
fax. 989 872 3782
smur...@walbro.com<mailto:smur...@walbro.com>

Confidentiality Notice: The materials contained within this e-mail transmission 
(including all attachments) are private and confidential and the property of 
the sender. The information contained in the materials is privileged and 
intended only for the named addressee(s). If you are not the intended 
addressee, be advised that any unauthorized disclosure, copying, distribution 
or the taking of any action in reliance on the contents of this material is 
strictly prohibited. If you have received this e-mail transmission in error, 
please immediately notify the sender by telephone at 989-872-7274 or send an 
e-mail to smur...@walbro.com<mailto:smur...@walbro.com> and thereafter destroy 
the e-mail you received and all copies thereof.

From: Andy 
Sent: Friday, July 06, 2018 12:02 PM
To: Murphy, Sean 
Cc: qt-creator 
Subject: Re: [Qt-creator] How to put custom build steps into Git?

Another thing I didn't mention is that if you want to avoid rebuilding files, 
the script can be smarter.

Generate to a temporary file and only copy it over the existing one if it is 
different.

I didn't bother for my setup because the header is only included in one place 
and only rebuilds a small file.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney<https://twitter.com/asmaloney>



On Fri, Jul 6, 2018 at 11:47 AM Murphy, Sean 
mailto:smur...@walbro.com>> wrote:
Thanks guys! Actually I think a combination of both your suggestions might work 
better than what I have currently. What I don’t like about my current setup is 
that the thing that generates the .h file is an executable – it has to be 
compiled to work. The only real advantage of that is that it is written in Qt, 
so it’s cross platform in that sense, but the disadvantage is that it doesn’t 
exist on a developer’s machine until it itself is compiled. So moving to a 
script is probably safer. The work it is doing is basically exactly the same as 
what you have described below.

So my current thought it to use Orgad’s commands in the .pro file, but have two 
scripts checked in to the project: a bash .sh file for Linux/Mac, and an 
equivalent .bat file for Windows, and properly platform scope the
  git_ver.commands = your-app-that-generates-the-version-header
command in the .pro file. That way I can avoid introducing a Cygwin dependency 
for the Windows users and still get that Git revision information compiled in 
automatically.

Sean Murphy
Sr. Project Engineer
Walbro LLC
4144 Doerr Rd
Cass City, MI 48726
ph. 989 872 7274
cell 734 223 8975
fax. 989 872 3782
smur...@walbro.com<mailto:smur...@walbro.com>

Confidentiality Notice: The materials contained within this e-mail transmission 
(including all attachments) are private and confidential and the property of 
the sender. The information contained in the materials is privileged and 
intended only for the named addressee(s). If you are not the intended 
addressee, be advised that any unauthorized disclosure, copying, distribution 
or the taking of any action in reliance on the contents of this material is 
strictly prohibited. If you have received this e-mail transmission in error, 
please immediately notify the sender by telephone at 989-872-7274 or send an 
e-mail to smur...@walbro.com<mailto:smur...@walbro.com> and thereafter destroy 
the e-mail you received and all copies thereof.

From: Andy mailto:asmalo...@gmail.com>>
Sent: Friday, July 06, 2018 11:04 AM
To: Murphy, Sean mailto:smur...@walbro.com>>
Cc: qt-creator mailto:qt-creator@qt-project.org>>
Subject: Re: [Qt-creator] How to put custom build steps into Git?

For my git info, I am using what feels like a hacky way to avoid having to add 
pre-build steps on every single project configuration. Might help?

In my .pro:


# Get our build info from git

OTHER_FILES += "$$PWD/gen_header.sh"



!build_pass {

UNUSED_RESULT = $$system(bash "$$PWD/gen_header.sh")

}


And then the contents of gen_header.sh:


#!/bin/bash



(

  echo '// Generated by gen_header.sh - do not edit'

  echo

  echo  '#define GIT_VERSION_LONG "'`git describe --long`'"'

  echo  '#define GIT_VERSION_HASH "'`git log --pretty=format:'%h' -n 1`'"'

  echo

  echo  '#define GIT_BUILD_DATE_LONG "'`git lo

Re: [Qt-creator] How to put custom build steps into Git?

2018-07-06 Thread Murphy, Sean
Thanks guys! Actually I think a combination of both your suggestions might work 
better than what I have currently. What I don’t like about my current setup is 
that the thing that generates the .h file is an executable – it has to be 
compiled to work. The only real advantage of that is that it is written in Qt, 
so it’s cross platform in that sense, but the disadvantage is that it doesn’t 
exist on a developer’s machine until it itself is compiled. So moving to a 
script is probably safer. The work it is doing is basically exactly the same as 
what you have described below.

So my current thought it to use Orgad’s commands in the .pro file, but have two 
scripts checked in to the project: a bash .sh file for Linux/Mac, and an 
equivalent .bat file for Windows, and properly platform scope the
  git_ver.commands = your-app-that-generates-the-version-header
command in the .pro file. That way I can avoid introducing a Cygwin dependency 
for the Windows users and still get that Git revision information compiled in 
automatically.

Sean Murphy
Sr. Project Engineer
Walbro LLC
4144 Doerr Rd
Cass City, MI 48726
ph. 989 872 7274
cell 734 223 8975
fax. 989 872 3782
smur...@walbro.com<mailto:smur...@walbro.com>

Confidentiality Notice: The materials contained within this e-mail transmission 
(including all attachments) are private and confidential and the property of 
the sender. The information contained in the materials is privileged and 
intended only for the named addressee(s). If you are not the intended 
addressee, be advised that any unauthorized disclosure, copying, distribution 
or the taking of any action in reliance on the contents of this material is 
strictly prohibited. If you have received this e-mail transmission in error, 
please immediately notify the sender by telephone at 989-872-7274 or send an 
e-mail to smur...@walbro.com<mailto:smur...@walbro.com> and thereafter destroy 
the e-mail you received and all copies thereof.

From: Andy 
Sent: Friday, July 06, 2018 11:04 AM
To: Murphy, Sean 
Cc: qt-creator 
Subject: Re: [Qt-creator] How to put custom build steps into Git?

For my git info, I am using what feels like a hacky way to avoid having to add 
pre-build steps on every single project configuration. Might help?

In my .pro:


# Get our build info from git

OTHER_FILES += "$$PWD/gen_header.sh"



!build_pass {

UNUSED_RESULT = $$system(bash "$$PWD/gen_header.sh")

}


And then the contents of gen_header.sh:


#!/bin/bash



(

  echo '// Generated by gen_header.sh - do not edit'

  echo

  echo  '#define GIT_VERSION_LONG "'`git describe --long`'"'

  echo  '#define GIT_VERSION_HASH "'`git log --pretty=format:'%h' -n 1`'"'

  echo

  echo  '#define GIT_BUILD_DATE_LONG "'`git log -n 1 --format=%ai`'"'

  echo  '#define GIT_BUILD_DATE_SHORT "'`git log -n 1 --format=%ad 
--date=short`'"'

) > gitVersion.h


On Windows I have cygwin installed, so bash may be found. Maybe this trades one 
type of config for another, but I already use cygwin for many things so I have 
it installed on all my Windows build machines.

Another limitation is that it executes every build, but I'm willing to deal 
with that for the convenience.

(Just saw Orgad's response - that might be cleaner?)

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney<https://twitter.com/asmaloney>



On Fri, Jul 6, 2018 at 10:48 AM Murphy, Sean 
mailto:smur...@walbro.com>> wrote:
> That is something that should be done by the build system IMHO

Can you expand on this part? By build system, I assume you mean qmake?
If that's what you meant, I'm all for doing it that way as well, how would I
go about adding what I'm looking for into the .pro file?

Basically, in our current setup, we're all using qmake as the build system,
so if there's a solution that works via qmake variables, I'm totally fine with
that too, I just haven't found them yet if they exist. If it matters, we're
currently targeting Windows (using mingw compiler) and Mac desktops,
but have plans for Android and iOS down the road, so I'd like to have this
be something that is set up once, and then each developer gets it for free
when they clone the Git repo.

As it stands right now, each developer has to manually set these up. Hell,
I even have to manually set it up if I clone my repository on my own
machine. I usually have our release branch checked out in one directory,
and then I clone from there into other directories to create feature
branches. So on that cloned repo, I've temporarily lost those build settings
until I manually re-add them to that cloned directory's .pro.user file,
either by manually copying the previous .pro.user file over, or by using
the Projects pane in Qt Creator to add the steps back in.

I'm also totally open to being told my approach is just completely wrong,
as long as someone has a better approach!

Thanks,
Sean



This message

Re: [Qt-creator] How to put custom build steps into Git?

2018-07-06 Thread Murphy, Sean
This looks really promising, I’ll play around with this and see where I get.

Sean Murphy
Sr. Project Engineer
Walbro LLC
4144 Doerr Rd
Cass City, MI 48726
ph. 989 872 7274
cell 734 223 8975
fax. 989 872 3782
smur...@walbro.com<mailto:smur...@walbro.com>

Confidentiality Notice: The materials contained within this e-mail transmission 
(including all attachments) are private and confidential and the property of 
the sender. The information contained in the materials is privileged and 
intended only for the named addressee(s). If you are not the intended 
addressee, be advised that any unauthorized disclosure, copying, distribution 
or the taking of any action in reliance on the contents of this material is 
strictly prohibited. If you have received this e-mail transmission in error, 
please immediately notify the sender by telephone at 989-872-7274 or send an 
e-mail to smur...@walbro.com<mailto:smur...@walbro.com> and thereafter destroy 
the e-mail you received and all copies thereof.

From: Orgad Shaneh 
Sent: Friday, July 06, 2018 11:00 AM
To: Murphy, Sean 
Cc: qt-creator@qt-project.org
Subject: Re: [Qt-creator] How to put custom build steps into Git?

On Fri, Jul 6, 2018 at 5:48 PM Murphy, Sean 
mailto:smur...@walbro.com>> wrote:
> That is something that should be done by the build system IMHO

Can you expand on this part? By build system, I assume you mean qmake?
If that's what you meant, I'm all for doing it that way as well, how would I
go about adding what I'm looking for into the .pro file?

You can do it by:
git_ver.commands = your-app-that-generates-the-version-header
git_ver.target = your-header.h
QMAKE_EXTRA_TARGETS += git_ver
PRE_TARGETDEPS = $$git_ver.target # This should not be needed if cpp files use 
this header.

- Orgad


Click here<https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ==> to report 
this email as spam.


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] How to put custom build steps into Git?

2018-07-06 Thread Murphy, Sean
> That is something that should be done by the build system IMHO

Can you expand on this part? By build system, I assume you mean qmake?
If that's what you meant, I'm all for doing it that way as well, how would I 
go about adding what I'm looking for into the .pro file?  

Basically, in our current setup, we're all using qmake as the build system, 
so if there's a solution that works via qmake variables, I'm totally fine with 
that too, I just haven't found them yet if they exist. If it matters, we're 
currently targeting Windows (using mingw compiler) and Mac desktops, 
but have plans for Android and iOS down the road, so I'd like to have this 
be something that is set up once, and then each developer gets it for free 
when they clone the Git repo.

As it stands right now, each developer has to manually set these up. Hell, 
I even have to manually set it up if I clone my repository on my own 
machine. I usually have our release branch checked out in one directory, 
and then I clone from there into other directories to create feature 
branches. So on that cloned repo, I've temporarily lost those build settings 
until I manually re-add them to that cloned directory's .pro.user file, 
either by manually copying the previous .pro.user file over, or by using 
the Projects pane in Qt Creator to add the steps back in.

I'm also totally open to being told my approach is just completely wrong, 
as long as someone has a better approach!

Thanks,
Sean



This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] How to put custom build steps into Git?

2018-07-06 Thread Murphy, Sean
> Can you make use of the .pro.shared file for that?
> http://doc.qt.io/qtcreator/creator-sharing-project-settings.html

I just stumbled across that option yesterday, and I'm trying to work through it
to see if it works. Based on where those values are placed in the .pro.user 
file,
I'm not sure if it's going to work, as it seems like the XML chunk I need to 
copy
out of the .pro.user also contains some absolute paths as well as includes 
things
like the targeted Qt version. For the project we're working on, we don't have a
hard requirement that all developers must be using the same Qt version, and
the stuff I'm trying to put into the shared settings certainly doesn't depend on
Qt versions at all. But I'm not sure that I can chunk out what I need in a 
sensible
way that will work on someone else's machine.

I'll post back once I know more...

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] How to put custom build steps into Git?

2018-07-05 Thread Murphy, Sean
For our project, we've got two build customizations that we do, that we'd like 
to be able to put into source control, so that all developers automatically get 
them. But it appears that adding those steps via Qt Creator causes that 
information to get stored locally in the .pro.user file, which appears to have 
user-specific file paths in it, thereby making it a file that I don't think 
should ever get checked into source control?

So what's the right way to handle this sort of stuff?

Sean

PS - my question is really more intended in the general sense but the two 
specific things we're trying to put in there are:
 - under the Build Settings->Build Steps->Make->Make arguments we want to add 
the "-j" flag to speed up compilation
 - I've written a custom application that runs as a pre-build step. This 
application updates a header file with the current Git hash information so that 
that info get compiled into the application in the About dialog. This way, when 
users report an issue, I know which commit to start from. This application is 
located in a path that has a fixed RELATIVE path to the .pro file for the main 
project, but we need it automatically included as part of the build process 
when a user clones into this repository and opens the .pro file that the 
pre-build step is known and executed.

PPS - if there's a cleaner way to grab the Git hash compiled into the 
application, I'm all ears.


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] List of applications spawned by Qt Creator

2018-06-12 Thread Murphy, Sean
> > In my case, the worst offender is a program called CrowdStrike Falcon 
> > Sensor. I used 
> > to be able to "magically" disable it as well, but now they've password 
> > protected the
> > uninstaller, so I don't seem to have a way to uninstall it anymore...
>
> Nothing is impossible when you have a live linux with 
> http://www.chntpw.com/download/ 
> on a USB stick, and the option to boot from USB ;)

I'll probably pass on this option, since if discovered, I'd probably lose my 
job. 
Good to know it exists though!

> I forgot to mention also qtcreator_process_stub.exe, and of course your 
> application :)

Our applications are already on the list, but I'm adding 
qtcreator_process_stub.exe

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] List of applications spawned by Qt Creator

2018-06-12 Thread Murphy, Sean
> One of the issues with antivirus software can be if you create a lot of files
> (AFAIK), which of course is true when compiling, so you might want to ask for
> an ignored development directory where you can put all your project’s build
> directories.

Supposedly we have that in place already, but it doesn't seem to make 
much difference. I'll double check with them that it is actually setup that
way though.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] List of applications spawned by Qt Creator

2018-06-11 Thread Murphy, Sean
> From my experience, anti-viruses tend to be intolerable, and worse than the 
> viruses 
> they should protect against.

100% agree

> I had several AVs installed on my machine by IT (we had Checkpoint, then 
> Kaspersky).
> They all magically ended up disabled (s... don't tell anyone).

In my case, the worst offender is a program called CrowdStrike Falcon Sensor. I 
used 
to be able to "magically" disable it as well, but now they've password 
protected the
uninstaller, so I don't seem to have a way to uninstall it anymore...

> In practice, if you need a whitelist, I can think of the following:
> mingw32-make.exe, gcc.exe, g++.exe, cc1plus.exe, gdb.exe, 
> nmake.exe, jom.exe, cl.exe, *.cpp, *.c, *.h, *.hpp

Keep them coming, thanks!
Sean



This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] List of applications spawned by Qt Creator

2018-06-11 Thread Murphy, Sean
I'm in a fight with my corporate IT guys about anti-virus software that they've 
put on my machine which is absolutely killing performance when attempting to 
debug software I'm developing. It takes more than 5 minutes from clicking 
File->Open in my application to having a working file dialog - and that has 
been timed with a stopwatch, it's not an exaggeration.

They've agreed to try whitelisting certain .exe's if I can get them a list, so 
I'm trying to figure out a comprehensive list of what Qt Creator spawns when 
compiling and debugging on Windows. Is there a list of the executables 
somewhere? By watching Task Manager, I can see things like "mingw-make32.exe" 
while compiling and "gdb.exe" and "gdborig.exe" while debugging, just not sure 
if there are others.


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] How to break on an assert?

2018-06-08 Thread Murphy, Sean
> > Is there some setting in gdb/Qt Creator that would automatically break on
> this assertion?
> 
> Q_ASSERT uses qFatal(), so you can break on that and get a stack trace.
> 
> Preferences... -> Debugger -> GDB Extended has "Stop when qFatal() is
> called", which might do what you need.

Thanks! That did the trick. I notice at the top of that tab it says "The 
options below should be used with care.", can anyone talk me through the harm 
of leaving this option enabled (and maybe the "Stop when abort() is called") as 
well?

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Odd behavior where Creator fails to find executable

2018-05-17 Thread Murphy, Sean
> You are hit by https://bugreports.qt.io/browse/QTCREATORBUG-20371 and
> its as related marked reports.

Ahh ok, I did see that one yesterday, but didn't dig hard enough to see that
it's related to my issue. I won't worry about reporting it then, just living 
with
it until it's fixed in a future release!

Thanks,
Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] Odd behavior where Creator fails to find executable

2018-05-16 Thread Murphy, Sean
I'm experiencing an intermittent issue that I'm wondering if anyone else is 
seeing, has an idea how to prevent, or can at least point me towards something 
to help me provide more information for creating a bug report?

The issue:
Periodically when I attempt to debug my program, Qt Creator throws up an error 
message: 
Starting executable failed: C:\\myApp.exe: No such file or 
directory.

The error message is technically correct, the path it is trying to execute is 
wrong - it's up one directory up from where the compiled debug executable is. 
When this error occurs, if I go to the Projects->Qt 5.9.1->Run settings I see 
the following for the Executable entry, which is the same wrong path that the 
error dialog displayed:
Executable: \build-myApp-Qt_5_9_1-Debug\myApp.exe
If at this point, I close the project (leaving Qt Creator open) and relaunch 
the project and then look at the same setting entry I now see the correct path 
and I'm once again able to debug:
Executable: \build-myApp-Qt_5_9_1-Debug\debug\myApp.exe  // Notice 
the extra "debug" directory in the path
At this point pressing  the Debug button (or F5) correctly launches my 
application in the debugger.

I have no idea what is causing this yet, other than it happens "after a while". 
The circumstances leading up to this is that I've had the Qt Creator and this 
specific project open for DAYS, writing code, compiling, debugging, etc. with 
no issues and then suddenly today this problem popped up on my first attempt to 
launch a debug session after writing some new code. Compilation was still 
working correctly, and in fact I had compiled the .exe, then was unable to 
launch it, closed the project, reopened, and immediately hit debug which worked 
- no compilation was necessary in the new session, so the .exe was up-to-date.

This is the second time this issue has occurred, it happened to me once last 
week as well. Both times just closing the project and reopening seems to 
restore the correct executable path, I just don't know what is causing it to 
break in the first place. And either no one else has reported this as a bug, or 
I'm not putting in the correct search terms on bugreports.qt.io, because I'm 
not finding anything that looks similar.

Using Qt Creator 4.6.0

Thanks in advance, 
Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Copy code with line numbers?

2018-04-27 Thread Murphy, Sean
> > Is there a way in Qt Creator to copy a block of code out of Creator 
> > including
> the line numbers? I *sometimes* find it handy to do that when emailing with
> a co-worker explaining how a certain segment of code works, where I can
> just refer back to line numbers in my explanation which is above or below
> the actual code.
> 
> Screenshot?

I thought about that, but it would be more useful to the recipient if they 
could copy/paste
snippets out of the code.

> Pastebin?

That might be closer, but the downside is the explanation of the code in my 
email
and the code itself aren't near each other.

This isn't a big issue, just a curiosity on my part. It arose by my manager 
asking if we
were sure a certain chunk of code does what we thought it does, so I was pulling
that chunk out of the project, but then providing a little context of what some 
of the
variables were, where this code is called, etc. since it was just a code 
snippet, and I
was thinking how much more helpful it would have been if there were line numbers
automatically included.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] Copy code with line numbers?

2018-04-26 Thread Murphy, Sean
Is there a way in Qt Creator to copy a block of code out of Creator including 
the line numbers? I *sometimes* find it handy to do that when emailing with a 
co-worker explaining how a certain segment of code works, where I can just 
refer back to line numbers in my explanation which is above or below the actual 
code.

Sean 



This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Odd QtCreator hang

2018-04-25 Thread Murphy, Sean
> Am 17.04.2018 um 18:01 schrieb Murphy, Sean:
> >>> Disassembler
> >>> 0x7741000c   cc  int3
> >>> 0x7741000d  <+0x0001>c3  ret
> >>> 0x7741000e  <+0x0002>90  nop
> >>
> >> There are other threads running at that time. The output of
> >> 'thread apply all backtrace full' would be interesting.
> >
> > How do I acquire this?
> 
> I guess André meant:
> 1. Stop at the breakpoint.
> 2. Select "Window" -> "Views" -> "Debugger Log".
> 3. Right-click into the Debugger Log and select "Clear Contents" from
> the context menu.
> 4. Use the "Command" edit to execute what he wrote.
> 5. Send us the output.

Thanks for the step-by-step, here's the results if I did it correctly...

t09:49:04.101 [1ms]
<2980thread apply all backtrace full
t09:49:04.130 [29ms]
>&"thread apply all backtrace full\n"
>~"\nThread 5 (Thread 17944.0x4490):\n"
>~"#0  0x777ef901 in ntdll!ZwWaitForSingleObject () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x777ef901 in ntdll!ZwWaitForSingleObject () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x7781ebf6 in ntdll!RtlRandomEx () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x7781eada in ntdll!RtlRandomEx () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x778099e9 in ntdll!RtlAllocateActivationContextStack () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#5  0x7780978c in ntdll!RtlDecodePointer () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#6  0x778097b9 in ntdll!LdrInitializeThunk () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#7  0x in ?? ()\n"
>~"No symbol table info available.\n"
>~"\nThread 4 (Thread 17944.0x3558):\n"
>~"#0  0x777ef901 in ntdll!ZwWaitForSingleObject () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x777ef901 in ntdll!ZwWaitForSingleObject () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x7781ebf6 in ntdll!RtlRandomEx () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x7781eada in ntdll!RtlRandomEx () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x778099e9 in ntdll!RtlAllocateActivationContextStack () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#5  0x7780978c in ntdll!RtlDecodePointer () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#6  0x778097b9 in ntdll!LdrInitializeThunk () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#7  0x in ?? ()\n"
>~"No symbol table info available.\n"
>~"\nThread 3 (Thread 17944.0x26d8):\n"
>~"#0  0x777ef901 in ntdll!ZwWaitForSingleObject () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#1  0x777ef901 in ntdll!ZwWaitForSingleObject () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#2  0x7781ebf6 in ntdll!RtlRandomEx () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#3  0x7781eada in ntdll!RtlRandomEx () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#4  0x778099e9 in ntdll!RtlAllocateActivationContextStack () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#5  0x7780978c in ntdll!RtlDecodePointer () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#6  0x778097b9 in ntdll!LdrInitializeThunk () from 
>C:\\windows\\system32\\ntdll.dll\n"
>~"No symbol table info available.\n"
>~"#7  0x in ?? ()\n"
>~"No symbol table info available.\n"
>~"\nThread 2 (Thread 17944.0x39d4):\n"
>~"#0  0x777e000d in ntdll!DbgBreakPoint () from 
>C:\\windows\\system3

Re: [Qt-creator] Odd QtCreator hang

2018-04-17 Thread Murphy, Sean
> > Disassembler
> > 0x7741000c   cc  int3
> > 0x7741000d  <+0x0001>c3  ret
> > 0x7741000e  <+0x0002>90  nop
> 
> There are other threads running at that time. The output of
> 'thread apply all backtrace full' would be interesting.

How do I acquire this?

> Perhaps even in JIRA.

As a new bug, or attached to one of the two ones that seem related?

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Odd QtCreator hang

2018-04-17 Thread Murphy, Sean
> > I've got an odd hang with QtCreator when debugging my software.
> Oh, as you are on Windows, that's the third platform that show
> clipboard-related strage effects.
> 
> We already have QTCREATORBUG-20262 and QTBUG-67729. Can you please
> check
> these?

I had stumbled upon QTBUG-67729 yesterday when searching for this issue, and I 
think I read this line from it differently than I am today: " We consistently 
get a hang 
when we hit a breakpoint if we happen to copy text to the clipboard before we 
hit
the breakpoint". I dismissed that as different than what I was doing, but this 
morning
I think it might be essentially the same. What I was doing was setting a 
breakpoint 
well above the QClipboard::setText() call (which is why I thought it wasn't 
quite the same),
but then I was stepping one line at a time through my code including over that 
line,
which I'm now guessing is effectively the same as setting a breakpoint after 
the copy.

I didn't find QTCREATORBUG-20262 yesterday, but I just built it and ran it as 
the reporter
described. They didn't post the .pro file used, so I'm not sure if all of those 
build settings were
the same. Anyways, when I ran it Qt Creator didn't lock up, but I did get the 
attached popup. If I 
switch the QClipboard::setImage() call in his example to QClipboard::setText(), 
leaving the 
breakpoint on the qDebug() line, Creator again doesn't hang, but it does drop 
into the 
disassembler (relevant info pasted below).

I'm realizing that I neglected to mention that I am using the mingw toolchain 
on Windows,
so maybe it's a gdb issue?

Call stack when disassembler hit
1 ntdll!DbgBreakPoint 0x7741000d 
2 ntdll!DbgUiRemoteBreakin0x7749f306 
3 ??  0x6ac2b5ef 
4 KERNEL32!BaseThreadInitThunk0x76be343d 
5 ntdll!RtlInitializeExceptionChain   0x77439832 
6 ntdll!RtlInitializeExceptionChain   0x77439805 
7 ?? 

Disassembler
0x7741000c   cc  int3
0x7741000d  <+0x0001>c3  ret
0x7741000e  <+0x0002>90  nop
0x7741000f  <+0x0003>90  nop
0x77410010  <+0x0004>90  nop
0x77410011  <+0x0005>90  nop
0x77410012  <+0x0006>90  nop
0x77410013  <+0x0007>90  nop
0x77410014  <+0x0008>90  nop
0x77410015  <+0x0009>90  nop
0x77410016  <+0x000a>90  nop
0x77410017  <+0x000b>90  nop
0x77410018  <+0x000c>90  nop
0x77410019  <+0x000d>90  nop
0x7741001a  <+0x000e>90  nop
0x7741001b  <+0x000f>90  nop
0x7741001c  <+0x0010>90  nop
0x7741001d  <+0x0011>90  nop
0x7741001e  <+0x0012>90  nop
0x7741001f  <+0x0013>90  nop
0x77410020  <+0x0014>90  nop
0x77410021  <+0x0015>90  nop
0x77410022  <+0x0016>90  nop
0x77410023  <+0x0017>90  nop
0x77410024  <+0x0018>90  nop
0x77410025  <+0x0019>90  nop
0x77410026  <+0x001a>90  nop
0x77410027  <+0x001b>90  nop
0x77410028  <+0x001c>90  nop
0x77410029  <+0x001d>90  nop
0x7741002a  <+0x001e>90  nop
0x7741002b  <+0x001f>90  nop
0x7741002c  <+0x0020>90  nop
0x7741002d  <+0x0021>90  nop
0x7741002e  <+0x0022>90  nop
0x7741002f  <+0x0023>90  nop
0x77410030  <+0x0024>90  nop
0x77410031  <+0x0025>90  nop
0x77410032  <+0x0026>90  nop
0x77410033  <+0x0027>90  nop
0x77410034  <+0x0028>90  nop
0x77410035  <+0x0029>90  nop
0x77410036  <+0x002a>90  nop
0x77410037  <+0x002b>90  nop
0x77410038  <+0x002c>90  nop
0x77410039  <+0x002d>90  nop
0x7741003a  <+0x002e>90  nop
0x7741003b  <+0x002f>90  nop
0x7741003c  <+0x0030>90  nop
0x7741003d  <+0x0031>90  nop
0x7741003e  <+0x0032>90  nop
0x7741003f  <+0x0033>90  nop
0x77410040  <+0x0034>8b 4c 24 04 mov0x4(%esp),%ecx
0x77410044  <+0x0038>f6 41 04 06 testb  $0x6,0x4(%ecx)
0x77410048  <+0x003c>74 05   je 0x7741004f 

0x7741004a  <+0x003e>e8 a1 1d 01 00  call   0x77421df0 

0x7741004f  <+0x0043>b8 01 00 00 00  mov$0x1,%eax
0x77410054  <+0x0048>c2 

[Qt-creator] Odd QtCreator hang

2018-04-16 Thread Murphy, Sean
I've got an odd hang with QtCreator when debugging my software.

I've got the following function where I'm trying to copy the data out of a 
QTableView to the clipboard in a format that will allow the resulting data to 
be pasted directly into an Excel spreadsheet. Here's the function:
void plotContainerWidget::slotCopyTableToClipboard()
{
// select everything in table copy it to text string with
// '\t' separating columns and '\n' separating rows
if(mModel == 0)
{
return;
}

int rows = mModel->rowCount();
int cols = mModel->columnCount();

QString tableString;
for(int i=0; i < cols; ++i)
{
tableString += mModel->headerData(i, Qt::Horizontal).toString();
tableString += "\t";
}
tableString.chop(1); // remove extraneous tab
tableString += "\n";

for(int i=0; i < rows; ++i)
{
for(int j=0; j < cols; ++j)
{
tableString += mModel->data(mModel->index(i, j), 
Qt::DisplayRole).toString();
tableString += "\t";
}
tableString.chop(1); // remove extraneous tab
tableString += "\n";
}
tableString.chop(1); // remove extraneous newline
qDebug() << tableString;
QClipboard* clippy = QApplication::clipboard();
if (!clippy)
{
return;
}
clippy->setText(tableString); // *** QT CREATOR HANGS HERE ***
qDebug() << "copied table to clipboard";
}

When I execute this chunk of code within the debugger, it hangs at that 
QClipboard::setText() line. I first encountered it executing my code within the 
debugger, but without any breakpoints set. During that session, Qt Creator 
hung, and I had to force quit. After re-launching QtCreator, I set a breakpoint 
in this function and stepped through my code. The parsing is fine up until that 
line, the string looks good, but then Qt Creator hangs when that line setText() 
is executed. So this issue seems to happen whether I have any breakpoints set 
or not and interestingly this code does NOT hang when I choose "Run" from 
within Qt Creator, only when I choose "Start Debugging", even though that 
should still be executing the debug build of my application, just not running 
inside the debugger.

Qt version 5.3.2 (yes, I know this is ancient...)
Qt Creator 4.5.2 (at least this isn't!)
Windows 7 64-bit

Any ideas?
Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] Memory profiling options for Qt on Windows

2017-04-11 Thread Murphy, Sean
I'm using Qt Creator with mingw as my compiler and I need to profile my code to 
find a performance bottleneck. My biggest issue is mostly a company bureaucracy 
one of them not giving me a Linux setup, so I'm stuck trying to get something 
working on Windows.

I found this link https://wiki.qt.io/Profiling_and_Memory_Checking_Tools on the 
qt.io site, and I'm assuming it's still valid? 

Does anyone have any other comments about doing this, or am I missing something 
built right into Qt Creator itself?

Thanks,
Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Creator, debugging, and Windows virus scanners

2016-08-17 Thread Murphy, Sean
> Could you paste the content of the right side pane of the debugger log
> somewhere? The debugger log can be enabled under Window -> Views ->
> Debugger Log while in debug mode. Please also enable "Log Time Stamps"
> from the debugger log context menu.
> 
> My first guess would be that the communication with the Microsoft symbol
> server is blocked and times out for every symbol file that is looked up,
> but the log will tell more about that ;)

Sure, here it is:

t06:55:04.941 [636144ms]
sStarting debugger "GdbEngine" for ABI "x86-windows-msys-pe-32bit"...
t06:55:04.941
dStart parameters: 'MyApp' mode: 1
dABI: x86-windows-msys-pe-32bit
dLanguages: c++ 
dExecutable: 
C:\Users\smurphy\Documents\Walbro\pctools\build-MyApp-Qt_5_3_2-Debug\debug\MyApp.exe
 
dDirectory: C:\Users\smurphy\Documents\Walbro\pctools\build-MyApp-Qt_5_3_2-Debug
dDebugger: C:\Qt_5_3_2\Tools\mingw482_32\bin\gdb.exe
dProject: C:\Users\smurphy\Documents\Walbro\pctools\MyAppAddtional Search 
Directories:
dRemote: :0
dSysroot: 
dDebug Source Location: 
t06:55:04.941
dDebugger settings: 
dWarnOnReleaseBuilds: true  (default: true)
dIdentifyDebugInfoPackages: false  (default: false)
dIntelFlavor: false  (default: false)
dBreakpointCorrection: true  (default: true)
dCDB_Console: false  (default: false)
dLoadGdbInit: true  (default: true)
dIgnoreFirstChanceAccessViolation: false  (default: false)
dAttemptQuickStart: false  (default: false)
dLoadGdbDumpers2: false  (default: false)
dGdbPostAttachCommands:   (default: )
dGdbStartupCommands:   (default: )
dExtraDumperFile:   (default: )
dAlwaysAdjustColumnWidths: true  (default: true)
dAdditionalArguments:   (default: )
dGdbCustomDumperCommands:   (default: )
dSourcePaths:   (default: )
dSymbolPaths:   (default: )
dBreakOnCrtDbgReport: false  (default: false)
dBreakEvent:   (default: )
dUseToolTips: true  (default: true)
dShowThreadNames: false  (default: false)
dUseToolTipsInBreakpointsView: true  (default: false)  ***
dUseToolTipsInLocalsView: false  (default: false)
dUseAddressInBreakpointsView: false  (default: false)
dUseToolTipsInBreakpointsView: true  (default: true)
dRegisterForPostMortem: false  (default: false)
dUseAddressInStackView: false  (default: false)
dCloseMemoryBuffersOnExit: true  (default: true)
dCloseBuffersOnExit: false  (default: false)
dBreakpointsFullPath: false  (default: false)
dSwitchModeOnExit: true  (default: false)  ***
dStationaryEditorWhileStepping: false  (default: false)
dRaiseOnInterrupt: true  (default: true)
dUseCodeModel: true  (default: true)
dUseDebuggingHelper: true  (default: true)
dUseAlternatingRowColours: false  (default: false)
dUseMessageBoxForSignals: true  (default: true)
dFontSizeFollowsEditor: false  (default: false)
dAutoQuit: false  (default: false)
dLogTimeStamps: true  (default: false)  ***
dQmlInspector.ShowAppOnTop: false  (default: false)
dSelectedPluginBreakpointsPattern: .*  (default: .*)
dNoPluginBreakpoints: false  (default: false)
dBreakOnCatch: false  (default: false)
dBreakOnThrow: false  (default: false)
dBreakOnFatal: false  (default: false)
dBreakOnWarning: false  (default: false)
dShowQmlObjectTree: true  (default: true)
dBreakOnAbort: false  (default: false)
dDisplayStringLimit: 100  (default: 100)
dMaximalStringLength: 1  (default: 1)
dEnableReverseDebugging: false  (default: false)
dSkipKnownFrames: false  (default: false)
dAllPluginBreakpoints: true  (default: true)
dAdjustBreakpointLocations: true  (default: true)
dSelectedPluginBreakpoints: false  (default: false)
dMaximalStackDepth: 20  (default: 20)
dShowStandardNamespace: true  (default: true)
dShowQObjectNames: false  (default: false)
dShowQtNamespace: true  (default: true)
dAutoDerefPointers: true  (default: true)
dSortStructMembers: true  (default: true)
dAutoEnrichParameters: true  (default: true)
dWatchdogTimeout: 20  (default: 20)
dTargetAsync: false  (default: false)
dUseDynamicType: true  (default: true)
dMultiInferior: false  (default: false)
t06:55:04.950 [9ms]
dState changed from DebuggerNotReady(0) to EngineSetupRequested(1) [master]
t06:55:04.950
dQUEUE: SETUP ENGINE
t06:55:04.982 [32ms]
dCALL: SETUP ENGINE
t06:55:04.982
dTRYING TO START ADAPTER
t06:55:04.982
dENABLING TEST CASE: 0
t06:55:04.982
dSTARTING C:/Qt_5_3_2/Tools/mingw482_32/bin/gdb.exe -i mi 
--tty=\\.\pipe\creator-12636-4818
t06:55:05.086 [104ms]
dGDB STARTED, INITIALIZING IT
t06:55:05.087 [1ms]
<142show version
t06:55:05.087
<143show debug-file-directory
t06:55:05.087
<144set print object on
t06:55:05.088 [1ms]
<145set breakpoint pending on
t06:55:05.088
<146set print elements 1
t06:55:05.089 [1ms]
<147handle SIGSEGV nopass stop print
t06:55:05.089
<148set unwindonsignal on
t06:55:05.089
<149set width 0
t06:55:05.089
<150set height 0
t06:55:05.089
sSetting up inferior...
t06:55:05.440
<151set substitute-path C:/work/build/qt5_workdir/w/s 
C:/Qt_5_3_2/5.3/mingw482_32
t06:55:05.441 [1ms]
<152set substitute-path Q:/qt5_workdir/w/s C:/Qt_5_3_2/5.3/mingw482_32
t06:55:05.441
<153set 

Re: [Qt-creator] Autocompletion of 0.0 to 0->0 in QtCreator 4.x series

2016-06-23 Thread Murphy, Sean
>  At what point is the bug that autocompletes 0.0 to 0->0 going to be
>  fixed? Just curious? Those of us writing scientific codes where we
>  initialize our floats/doubles to actual values are really effected by
>  this bug.
> >>>
> >>> What version(s) are you seeing this in? I'm using Qt Creator 4.0.0,
> >>> based on 5.6.0 on Windows and I don't see the behavior you're
> describing.
> >>> If I type "0." the period stays a period, and then I can type the next 0 
> >>> and
> >>> still get "0.0".
> >>>
> >>> Sean
> >>
> >> 4.0.1, 4.0.2, 4.0.3 all nightlies from download.qt.io. Running on OS X
> >> 10.10.4 with the latest Xcode for that OS.
> >>
> >> Maybe it is how I have a settings configured?
> >
> > Maybe? I just switched over to OS X, downloaded the official Qt 5.7.0 with
> > Qt 4.0.2, opened an existing project I had, and typed "0." and it was NOT
> > autocorrected to "0->". Is there another step you're doing that I'm missing?
> >
> > I also tried with a new project (Qt Widget Application) with the same 
> > result.
> >
> > OS X version 10.11.5, Xcode 7.3.1 if that helps.
> 
> I think this only happens with the Clang code model, so you’d need to turn
> that on (About Plugins… > ClangCodeModel) to see the issue.

Ahh, yep you're correct. Once I enabled the clang code model I see the issue
that Mike was describing.

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Problems with new qt creator in qt 5.7

2016-06-20 Thread Murphy, Sean
> I have code completion issue on Linux, too. My problem is that I have to 
> press 
> Esc to hide the 'signature preview' ( I don't know what it is) to make the 
> code 
> completion works right.

Is it this bug that I filed? https://bugreports.qt.io/browse/QTCREATORBUG-16358

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Autocomplete oddities

2016-05-18 Thread Murphy, Sean
 Issue #1
 When typing the example line, I type up to the first ‘&’ and get the
 following. I know at some point in the past, as soon as I’d type the ‘&’
 autocomplete would suggest that I want to type “MainWindow” next,
 but that no longer happens.
>>>
>>> I think there is a difference how this currently is handled in the
>>> completion for the built-in code model and the Clang code model.
>>> Please note that in 4.0 Qt Creator automatically uses the Clang code
>>> model if the plugin is turned on (it is off by default), can you please 
>>> check if you
>>> have, and if going back to built-in restores the behavior that you are used 
>>> to?
>>
>> I think the ClangCodeModel plugin is off?
> 
> Looks like it.

I went back and tested this issue against all of the versions of Qt Creator I
have installed here and came up with these results:
3.2.2 doesn't work
3.4.1 works correctly
3.4.2 works correctly
3.6.1 works correctly
4.0.0 doesn't work
4.0.1 (18-May-2016 snapshot) doesn't work

Not sure how helpful that is, but at least it's more data. I'd be happy to 
create a bug report if it's an issue others are seeing?

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Autocomplete oddities

2016-05-18 Thread Murphy, Sean
> > > > Issue #1
> > > > When typing the example line, I type up to the first ‘&’ and get the
> > > following. I know at some point in the past, as soon as I’d type the ‘&’
> > > autocomplete would suggest that I want to type “MainWindow” next,
> but
> > > that no longer happens.
> > >
> > > I think there is a difference how this currently is handled in the
> completion
> > > for the built-in code model and the Clang code model.
> > > Please note that in 4.0 Qt Creator automatically uses the Clang code
> model if
> > > the plugin is turned on (it is off by default), can you please check if 
> > > you
> have,
> > > and if going back to built-in restores the behavior that you are used to?
> >
> > I think the ClangCodeModel plugin is off?
> 
> Looks like it.

Any thoughts on what else I should try? And do you see the same behavior? 
It still happens with the latest 4.0.1 snapshot

> 
> > I’ve never intentionally enabled it.
> > 
> >
> > > > 
> > > >
> > > > Issue #2:
> > > > From the previous spot I type out “MainWindow::” by hand. After
> typing
> > > the second ‘:’ I get the popup of signal suggestions, but note how the
> item
> > > text in the list isn’t highlighted. You can see that the icon for the
> destroyed
> > > signal has a slight color difference (it’s a little more purple).
> > > > 
> > >
> > > Seems to be similar to
> https://bugreports.qt.io/browse/QTCREATORBUG-
> > > 16218
> >
> > It does seem similar to this, I think. But in my case this issue fixes 
> > itself
> temporarily after restarting Creator,
> > but then after some amount of usage within a session eventually starts
> happening again.
> >
> > > I wonder if this is related to https://bugreports.qt.io/browse/QTBUG-
> 52230
> > > though.
> 
> You can check with a recent 4.0.1 snapshot, which is based on a Qt 5.6.1
> prebuild, which should have the fix for QTBUG-52230
> http://download.qt.io/snapshots/qtcreator/4.0.1/

Trying it now, but when I have the issue, it definitely breaks over time. 
Immediately after
launching Creator it works perfectly, but then at some point it just stops 
working.

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Autocomplete oddities

2016-05-18 Thread Murphy, Sean
> > Issue #1

> > When typing the example line, I type up to the first ‘&’ and get the

> following. I know at some point in the past, as soon as I’d type the ‘&’

> autocomplete would suggest that I want to type “MainWindow” next, but

> that no longer happens.

>

> I think there is a difference how this currently is handled in the completion

> for the built-in code model and the Clang code model.

> Please note that in 4.0 Qt Creator automatically uses the Clang code model if

> the plugin is turned on (it is off by default), can you please check if you 
> have,

> and if going back to built-in restores the behavior that you are used to?



I think the ClangCodeModel plugin is off? I’ve never intentionally enabled it.

[cid:image001.png@01D1B0DE.1911A4B0]



> > 

> >

> > Issue #2:

> > From the previous spot I type out “MainWindow::” by hand. After typing

> the second ‘:’ I get the popup of signal suggestions, but note how the item

> text in the list isn’t highlighted. You can see that the icon for the 
> destroyed

> signal has a slight color difference (it’s a little more purple).

> > 

>

> Seems to be similar to 
> https://bugreports.qt.io/browse/QTCREATORBUG-

> 16218



It does seem similar to this, I think. But in my case this issue fixes itself 
temporarily after restarting Creator,

but then after some amount of usage within a session eventually starts 
happening again.



> I wonder if this is related to https://bugreports.qt.io/browse/QTBUG-52230

> though.




___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Why QtC does not use QDockWidget for most tool-panel

2016-04-14 Thread Murphy, Sean
> 
> On Thu, Apr 14, 2016 at 8:00 PM, René J. V.  wrote:
> > Either way, there is 1 kind of widget that I'd like to see as a dockable: 
> > the
> > one that now is a simple drop-down list containing the open files. I'd love 
> > to
> > be able to turn that into something that could take the form of a side-panel
> > showing a permanent view of the files open in the associated window - a
> view
> > that's show in addition to the project view (or whatever else that widget
> > shows). Let the entries show the file's full path, possibly with the project
> > they belong to when the mouse hovers over them, and you have what I'd
> think
> > would be a very useful, space-efficient (more so than tabs) and economical
> tool
> > to navigate quickly between files. Esp. if you can rearrange file order too.
> 
> hmm... This quite exactly describes the Open Documents pane.
> 
> Click the Split button in the left pane and choose Open Documents.
> 
> It's not dockable, and not reorderable, but apart from that it meets
> your requirements.

I'd argue that the combination of the Projects pane, the Open Documents pane, 
and
whatever the correct term is for the open documents pull-down menu above the 
coding
pane is a redundant use of screen real estate that could be better utilized if 
the functionality
of the Projects and Open Documents panes were rolled into one pane. What I have 
in 
mind is something like:
 - get rid of Open Documents pane, merging its functionality into Projects pane
 - change Projects pane to single left click opens document, I don't know why 
we need to 
double click to open a file in a project we consider to be "open"
 - use some sort of visual indicator to show that a file is open, either bold 
the file name, 
highlight background, etc. Alternatively, one could argue there's really no 
need to indicate 
a file is open but unmodified.
 - keep the asterisk at the end to indicate that the file has been modified but 
not saved

At least in my normal use-case, I have the side panel split vertically about 
2/3 for the Projects
pane and 1/3 for the Open Documents pane. As I work for a while, and get more 
open documents
I find that I end up having to scroll frequently in both panes to get to 
continue working, and with 
enough open files, it starts to become the same list, twice.

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Bug reporting question for an issue that affects QtCreator but appears to be a generic Qt problem

2015-11-10 Thread Murphy, Sean
So as I played around with it a little more today, I discovered that the 
behavior only exists if you call the static member function, with the show 
alpha channel option enabled.
  QColor QColorDialog::getColor(const QColor & initial = Qt::white, QWidget * 
parent = 0, const QString & title = QString(), ColorDialogOptions options = 0)

And use it like so: 
  QColor myColor = QColorDialog::getColor(QColor(255,255,255), 
QColorDialog::ShowAlphaChannel); // the ShowAlphaChannel part is key...

If you don't use the static member function and switch that line to the 
following:
  QColorDialog* dlg = new QColorDialog(QColor(255,255,255), this);
  dlg->setOption(QColorDialog::ShowAlphaChannel, true);
  dlg->show();

The problem disappears. So I guess that could be the QtDesigner work-around? 
But as you stated, that work-around doesn't really help QtCreator on its own 
unless it gets put into Qt.

Any tips on how better to get this addressed? I'm kind of shocked that this 
isn't causing problems for people beyond me, but given how long this issue has 
been around and the lack of votes for the issue, it appears that people aren't 
noticing it? Using the static member function is very convenient from a coding 
standpoint, but it doesn't seem to work correctly on the Mac. Maybe that just 
speaks to how few people are developing applications that play around with 
colors on Mac...

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] Bug reporting question for an issue that affects QtCreator but appears to be a generic Qt problem

2015-11-10 Thread Murphy, Sean
Yesterday I created a bug report on an issue that was making QtCreator 
difficult to use on the Mac 
(https://bugreports.qt.io/browse/QTCREATORBUG-15320). After a little more 
digging I figured out that it was really reproducible in any Qt application. As 
of today the bug has been closed as invalid. Is that the normal procedure - to 
close bugs that were reported under QtCreator when it's really a Qt bug?

It 100% affects QtCreator and makes QtCreator nearly unusable if you keep 
playing around with QPalette color choices when in designer mode on a Mac, 
eventually the color dialog will grow off the screen - and there's no way for 
the user to resize it smaller if they notice it's starting to grow. It's like 
the minimum size for the QColorDialog keeps increasing each time, so the resize 
handle only lets you increase the height of the dialog, not decrease it.

It also appears that the bug I reported is a duplicate of an already report Qt 
bug (https://bugreports.qt.io/browse/QTBUG-44620), which has existed since at 
least Qt 5.3.2 and still exists today in Qt 5.5.0, so I'm assuming I also can't 
really report it again on the Qt side? And apparently I'm the only vote on it, 
so it seems like somehow it isn't bothering other people, but it is certainly 
bothering me! I often use the QPalette system via designer to test out how a 
planned stylesheet is going to look in advance, but I can only change colors 
about 20 times or so, before I can no longer reach parts of the QColorDialog 
and the only solution at that point seems to be quitting QtCreator.

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Collapse/expand case statements?

2015-08-06 Thread Murphy, Sean
  Is there a way in Creator to collapse and expand case blocks that I'm
  missing?
 
  No, you might want to file a suggestion.
 
  I do that here?
  https://bugreports.qt.io/secure/Dashboard.jspa
 
 Yup, component: C/C++/Obj-C++ Support

Done. https://bugreports.qt.io/browse/QTCREATORBUG-14873
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Collapse/expand case statements?

2015-08-06 Thread Murphy, Sean
  Is there a way in Creator to collapse and expand case blocks that I'm
 missing?
 
 No, you might want to file a suggestion.

I do that here?
https://bugreports.qt.io/secure/Dashboard.jspa

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] Compiling fails to link *sometimes*

2014-07-09 Thread Murphy, Sean
I've got an odd issue that happens sometimes with Qt Creator 3.1.1 on Windows 
(Windows 7 64-bit if it matters...).  When I go to compile my project, 
sometimes it will error out saying something like failing to create myApp.exe, 
permission denied.  Sorry for not including the exact error, naturally I can't 
get it to do it now.

Even though I get that error, it appears I have a newly built application that 
has the correct timestamp on it.

Looking at the Compile Output tab, I see the following linker line repeated 
four times:
g++ -Wl,-subsystem,windows -mthreads -o debug\myApp.exe 
object_script.myApp.Debug -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 
-lqtmaind -LC:/Qwt-6.1.0/lib -lqwtd -LC:\Qt\5.2.0\mingw48_32\lib -lQt5Svgd 
-lQt5Widgetsd -lQt5SerialPortd -lQt5Guid -lQt5Cored
g++ -Wl,-subsystem,windows -mthreads -o debug\myApp.exe 
object_script.myApp.Debug -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 
-lqtmaind -LC:/Qwt-6.1.0/lib -lqwtd -LC:\Qt\5.2.0\mingw48_32\lib -lQt5Svgd 
-lQt5Widgetsd -lQt5SerialPortd -lQt5Guid -lQt5Cored
g++ -Wl,-subsystem,windows -mthreads -o debug\myApp.exe 
object_script.myApp.Debug -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 
-lqtmaind -LC:/Qwt-6.1.0/lib -lqwtd -LC:\Qt\5.2.0\mingw48_32\lib -lQt5Svgd 
-lQt5Widgetsd -lQt5SerialPortd -lQt5Guid -lQt5Cored
g++ -Wl,-subsystem,windows -mthreads -o debug\myApp.exe 
object_script.myApp.Debug -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 
-lqtmaind -LC:/Qwt-6.1.0/lib -lqwtd -LC:\Qt\5.2.0\mingw48_32\lib -lQt5Svgd 
-lQt5Widgetsd -lQt5SerialPortd -lQt5Guid -lQt5Cored

So what I think is happening is that the link step is being executed multiple 
times for some reason, and on one of them Windows thinks the file is still open 
for writing, and the subsequent attempt to open the file fails.  If I load in a 
different Qt project (like a Qt example) that line is only included once.  
Here's my .pro file, edited a little for brevity (I just snipped out the 
.h/.cpp/.ui file names):
#-
#
# Project created by QtCreator 2013-12-12T17:25:12
#
#-

QT   += core gui serialport

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = myApp
TEMPLATE = app
CONFIG += qwt

OBJECTS_DIR = .obj
MOC_DIR = .moc
UI_DIR = .ui

INCLUDEPATH += ../shared

SOURCES += all my .cpp files

HEADERS  += all my .h files

FORMS+= all my .ui files

RESOURCES += \
myApp.qrc

Thanks in advance,
Sean

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Compiling fails to link *sometimes*

2014-07-09 Thread Murphy, Sean
  I've got an odd issue that happens sometimes with Qt Creator 3.1.1 on
 Windows (Windows 7 64-bit if it matters...).  When I go to compile my
 project, sometimes it will error out saying something like failing to create
 myApp.exe, permission denied.
 
 Are you sure your app is not running at the time? Windows cannot write to
 the binary then.

Yep, 100% sure.  That was my first thought as well (and I've made that mistake 
a couple times).  But there's times where it happens when I definitely don't 
have the application open and haven't had it open for at least the time it 
takes to change some lines of code, hit the compile button, let the changed 
file compile, and then attempt to link.  So several seconds at least.

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Compiling fails to link *sometimes*

2014-07-09 Thread Murphy, Sean
  So what I think is happening is that the link step is being executed 
  multiple
 times for some reason, and on one of them Windows thinks the file is still
 open for writing, and the subsequent attempt to open the file fails.  If I 
 load
 in a different Qt project (like a Qt example) that line is only included once.
 Here's my .pro file, edited a little for brevity (I just snipped out the
 .h/.cpp/.ui file names):
 
 
 This might sound silly but, is there an anti-virus program running?
 
 I remember I had huge problems with some aggressive anti-virus program
 which was always checking the programs that I would generate on my
 machine.

It's a work machine, so I'm sure there's some sort of antivirus running on it.  
It looks like Trend Micro OfficeScan is installed.

Sometimes a compile works fine, sometimes it doesn't.  And usually when it 
doesn't, if I immediately press the compile button again, it works.

Sean


___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Compiling fails to link *sometimes*

2014-07-09 Thread Murphy, Sean
 Can you attach the Makefile generated by qmake?

 - Orgad

I attempted to include the makefile, but got a bounce back from the list that 
my message was too big:
  Message body is too big: 1064076 bytes with a limit of 1000 KB

So I'm not sure if it'll come through...
Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] Question about Qt Creator Help documentation

2013-07-23 Thread Murphy, Sean M.
I've got Qt Creator 2.8 installed built off from Qt 5.1.0.  When I first opened 
it up and loaded an existing project, I was able to access the help 
documentation, but it was for Qt 4.7.4, which is installed on this machine, but 
not the documentation I want to use.  I messed around with some settings trying 
to get the help documentation to point at Qt 5.1.  I successfully managed to 
get it to stop pointing at the Qt 4.7.4 documentation, so now when I hit F1 on 
a Qt class the Help pane pops up saying No documentation found!  Not exactly 
the result I was hoping for...

I'm not finding any .qch files under /usr/local/Qt-5.1.0 to point Qt Creator to.

Any suggestions?

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Issue accessing hardware from inside Qt Creator

2012-11-21 Thread Murphy, Sean M.
I'll double-check.  My app takes no parameters, and shouldn't really care which 
directory it's launched from.  I'm realizing (somewhat sheepishly) that 
accessing that hardware board is done through a shared library, so I should 
double-check that when I'm launching that app inside Creator, that it's able to 
find that .so...

Sean 

-Original Message-
From: Koehne Kai [mailto:kai.koe...@digia.com] 
Sent: Wednesday, November 21, 2012 3:06 AM
To: Murphy, Sean M.; qt-creator@qt-project.org
Subject: RE: Issue accessing hardware from inside Qt Creator

 -Original Message-
 From: qt-creator-bounces+kai.koehne=digia@qt-project.org 
 [mailto:qt-
 creator-bounces+kai.koehne=digia@qt-project.org] On Behalf Of
 Murphy, Sean M.
 Sent: Tuesday, November 20, 2012 7:02 PM
 To: qt-creator@qt-project.org
 Subject: [Qt-creator] Issue accessing hardware from inside Qt Creator
 
 [...]
 So is there some Qt Creator setting I've missed that allows 
 applications lower level hardware access from inside a Qt Creator session?

No, there shouldn't really be any difference. You should carefully check that
- the environment is indeed the same
- you're launching your app as the same user
- you're launching it in the same way, with the same parameters from the same 
directory

Regards

Kai

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] What is the correct way of removing UI elements with code ?

2012-10-10 Thread Murphy, Sean M.
  I have just encountered a problem, where I do not need a certain UI
  element e.g. QPushButton and I would like to remove it but since I
  have connected it with several slots (e.g. clicked(), released() etc.
  ) I now have several references of this button in my code.
 
  How can I remove all of this efficiently ? Do I have to remove it all
  manually ?
 
 
 Two things.
 
 (1) This is a question for qt-interest; this list is for issues
 concerning the IDE itself, not the toolkit.

This may not be a question for qt-interest.  I think he's asking the question: 

I thought I was going to need a QPushButton in my code, so I put one in, and 
started connecting its signal to slots all over my code.  Now I've refactored 
and decided I no longer need that object.  Is there a simple way to remove all 
references to it in my code using some Qt Creator functionality?

So I think maybe he's asking if there's similar functionality to find all 
references that is remove all references?

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] What is the correct way of removing UI elements with code ?

2012-10-10 Thread Murphy, Sean M.
   I have just encountered a problem, where I do not need a certain UI
   element e.g. QPushButton and I would like to remove it but since I
   have connected it with several slots (e.g. clicked(), released() etc.
   ) I now have several references of this button in my code.
  
   How can I remove all of this efficiently ? Do I have to remove it
   all manually ?
  
 
  Two things.
 
  (1) This is a question for qt-interest; this list is for issues
  concerning the IDE itself, not the toolkit.
 
  This may not be a question for qt-interest.  I think he's asking the 
  question:
 
  I thought I was going to need a QPushButton in my code, so I put one
 in, and started connecting its signal to slots all over my code.  Now
 I've refactored and decided I no longer need that object.  Is there a
 simple way to remove all references to it in my code using some Qt
 Creator functionality?
 
  So I think maybe he's asking if there's similar functionality to
 find all references that is remove all references?
 
  Sean
 
 Ah, good catch, I hadn't considered that interpretation, and that is a
 much more relevant topic.
 
 I wouldn't WANT to see remove all references, though; doing that in
 an automated way is sure to cause problems. Find all references on
 the other hand IS a good approach to at least get started at it.

Although as we are having this discussion, he has in fact reposted on 
qt-interest so who knows?!?!

Sean
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator