Root cause (see issue #218 discussion):
- QETApp::eventFiltrer (Q_OS_DARWIN) was correct in intent but never
actually installed as an event filter anywhere, and its name didn't
match the QObject::eventFilter virtual signature, so even if it had
been installed it would never have been invoked as an override.
Confirmed dead code.
- main.cpp instead routed Finder's QFileOpenEvent through
MacOSXOpenEvent -> SingleApplication::sendMessage(), which is the
secondary-to-primary IPC channel. Called from within the primary
instance itself, sendMessage() fails silently and the file path is
dropped, which is exactly what double-click does (Finder doesn't spawn
a secondary process, the running instance receives the FileOpen event
directly).
- openFiles() takes a QETArguments, not a QStringList. The dead code's
openFiles(QStringList() << filename) only worked via an untested
implicit QStringList -> QList<QString> -> QETArguments conversion
chain.
Fix:
- Rename eventFiltrer -> eventFilter (qetapp.h/.cpp) so it's a proper
override of QObject::eventFilter, and make it public so main.cpp can
install it on QApplication.
- Build the QETArguments explicitly instead of relying on implicit
conversion.
- main.cpp: drop MacOSXOpenEvent entirely (include + instantiation),
install qetapp as the Q_OS_MACOS event filter on app right after
QETApp qetapp; is constructed and before app.exec(). No race window:
the event loop hasn't started, so no QFileOpenEvent can be delivered
before the filter is installed.
QETArguments::handleFileArgument() already sorts files by extension
(.elmt, titleblock, else project) and openFiles() already fans out to
openProjectFiles()/openElementFiles()/openTitleBlockTemplateFiles()
accordingly, so this single fix covers .qet, .elmt and .titleblock
double-click/drag-to-dock on macOS, not just .qet.
SingleApplication's sendMessage/receivedMessage flow (used for CLI args
on all platforms) is untouched; this only touches the Q_OS_MACOS block,
so there is no behavior change on Windows/Linux.
Follow-up (not included here): the macOS Info.plist (misc/Info.plist)
has an empty CFBundleShortVersionString, which may affect macOS's
willingness to retain file associations across app updates.
- include Liberation-Fonts and osifont
(thanks elevatormind!)
- use "Liberation Sans" as default-font
- adjust License-Tab in About-Form
- Bugfix: When selecting a font, the current
font is highlighted in dialog
- adjust some whitespace and English comments
All export files that are derived from the project (BOM,
nomenclature, etc.) are saved in the same directory by default.
In this context, the standard directories have been grouped
together in qetapp.cpp / qetapp.h so that only one place needs
to be searched for in case of any adjustments.
* terminal_strip:
Terminal strip item can saved / loaded to .qet file
See previous commit...
Move terminal strip drawer class in is own file
Fix wrong use of QStringLiteral and QLatin1String
Double click a TerminalStripItem open the editor
Minor change about checkable QAction of QetDiagramEditor
Minor : corrects a minor aesthetic defect when unbridge terminals
Revamp code
Add and move terminal strip item are now managed by undo command
TerminalStripItem : Draw terminal bridge
Terminal strip item can be added to diagram
Minor : add QGIUtility namespace
the path is set the first time the function is called.
Each other call will immediately return the previously setted path
instead of check again what path to return.
Replace QETApp::diagramInfoKeys() by QETInformation::diagramInfoKeys()
and QETApp::diagramTranslatedInfoKey(str) by
QETInformation::translatedInfoKey(str)
Replace QETApp::conductorInfoKeys() and
QETApp::conductorTranslatedInfoKey(const QString &key) by
QETInformation::conductorInfoKeys() and
QETInformation::translatedInfoKey
Use the function QETInformation::translatedInfoKey(const QString &info)
instead of QETApp::elementTranslatedInfoKey(const QString &info).
The final goal is to remove all information from the QETApp and use
instea QETInformation who is dedicated to this
and a text width by default for new dynamic text, it work also in
element editor command.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5568 bfdf4180-ca20-0410-9c96-a3a8aa849046
Add variables for common and custom elements collections, to avoid multiple access to QSettings and so reduce the loading of collections.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5462 bfdf4180-ca20-0410-9c96-a3a8aa849046
1- QET create a backup file, use to restor the project when a crash occur
2- User can enable and edit autosave.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5374 bfdf4180-ca20-0410-9c96-a3a8aa849046
Possiblility to overide defaut settings by adding in QElectroTech.conf
diagramitemsize, diagramitemfont variable, for example:
[General]
diagramitemsize=12
diagramitemfont=droid
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5163 bfdf4180-ca20-0410-9c96-a3a8aa849046
Remove the management of custom and common elements collection in the class qetapp.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4529 bfdf4180-ca20-0410-9c96-a3a8aa849046