summaryrefslogtreecommitdiffstats
path: root/examples/assistant/simpletextviewer
Commit message (Collapse)AuthorAgeFilesLines
* Update MainWindow to dynamically display the active file namePatryk Stachniak2024-11-294-0/+12
| | | | | | | | | | | | | | | | | | | | Added functionality to update the main window's title with the name of the currently opened file in the text editor. This change improves user experience by providing a clear indication of the file being viewed or edited. Introduced a fileNameChanged signal in TextEdit to notify changes in the active file. Connected the signal to a new slot in MainWindow to update the window title dynamically. Adjusted FindFileDialog and TextEdit::setContents to emit the signal when a new file is opened. This enhancement addresses user feedback regarding better context visibility in the application. Task-number: QTBUG-118728 Pick-to: 6.8 Change-Id: Ib951592388943fcbc40efd7d41a6fc0452fc9b40 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Docs: Update the screenshots for the Qt Tools examplesAlexei Cazacov2024-10-107-0/+0
| | | | | | | | | | This commit updates the screenshots for the Qt Assistant and Qt Designer examples. Task-number: QTBUG-69988 Pick-to: 6.8 Change-Id: I17da7c173a7a8cac4d55f91aecefdf5473eef98a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Change license for build file in exampleLucie Gérard2024-03-151-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all examples file should be LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: Iace5eb946b0291ecdf54f7e42ba56e8912ea438b Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* SimpleTextViewer: Use new string literalsJarek Kobus2023-07-242-8/+12
| | | | | | Pick-to: 6.6 6.5 Change-Id: I703b7a364cc5e30327850e0a68869e5e7485bada Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* SimpleTextViewer: Revamp the exampleJarek Kobus2023-07-247-56/+39
| | | | | | | | | | | | | Fix const correctness. Fix code formatting. Fix error message on crash. Use initializer lists in c'tors. Limit the start assistant timeout to 3 seconds, like it's done for termination. Pick-to: 6.6 6.5 Change-Id: Idfafa35834fba725b03d80e6252be8ac3eaf489f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-061-1/+1
| | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I234704ba429750ddee958a82f6c941d041da0653 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-251-1/+1
| | | | | | Task-number: QTBUG-105718 Change-Id: I2df3a8aec11f30f301e3143e9960156b6f45e614 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-021-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I41a2c9aa6a933a4e3dda5d5b4c70c461912907b2 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-199-441/+18
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I5335388c0472b0ee554234fc7eca60769e504660 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove .prev_CMakeLists.txtKai Köhne2022-03-221-47/+0
| | | | | | | | Amends aeaa9e2a46a3 Pick-to: 6.3 Change-Id: I4ac5d380b72bb0952ddd8ceb55b262e7e8a4fba7 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Improve examples CMakeLists.txtKai Köhne2022-02-191-11/+5
| | | | | | | | | | | | | | | | | | | - Remove # generated from xyz.pro comment from pro2cmake - Remove "# special case" markers for pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR, when unnecessary - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Pick-to: 6.3 Change-Id: If8bf84b498189fa681cfe5128bc8566026dabec0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Bump almost all cmake_minimum_required calls to 3.16Alexandru Croitor2021-09-221-1/+1
| | | | | | | | | | | | | Needed for subsequent change that will check and error out if the version is lower than 3.16. We do that to ensure all policies introduced by CMake up to version 3.16 have their behavior set to NEW. Pick-to: 6.2 Task-number: QTBUG-95018 Change-Id: I1191a6b4b5c13b2b6047a0e2a2ff8c3801f6762b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Examples: Don't use QDir::separator() in internal pathsKai Köhne2021-06-142-6/+7
| | | | | | | | | | | | Documentation says: You do not need to use this function to build file paths. If you always use "/", Qt will translate your paths to conform to the underlying operating system. Pick-to: 5.15 6.2 Change-Id: Iba62a197821b9abc819c3d333e44c9f1ed989898 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Don't use deprecated QLibrary::locationVolker Hilsheimer2021-03-262-3/+3
| | | | | | | Use QLibrary::path instead to silence compiler warnings. Change-Id: Ib39ab1528f6060ae37dddfaf6b69e420c37bcd35 Reviewed-by: hjk <hjk@qt.io>
* CMake: Regenerate examples to set the WIN32_EXECUTABLE propertyAlexandru Croitor2020-10-262-0/+8
| | | | | | | | As well as the MACOSX_BUNDLE properties as necessary. Task-number: QTBUG-87664 Change-Id: I26917656f6f2b653649765ebbea4e3f348b22ae7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate examples to use qt_add_executableAlexandru Croitor2020-10-202-2/+2
| | | | | | Task-number: QTBUG-87661 Change-Id: I06af51591b79f9432d09b08595f8af021118a6dc Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Port QtTools examples to cmakeMårten Nordheim2020-06-032-0/+86
| | | | | Change-Id: I11146959edbec6b4577fdd339d0fcb807f53c95b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Polish the SimpleTextViewer exampleFriedemann Kleint2020-04-246-45/+54
| | | | | | | | | | | - Port to Qt 5 connection syntax, fixing error in Qt 6 QObject::connect: No such signal QComboBox::currentIndexChanged(QString) in findfiledialog.cpp:194 - Remove unused functions and parameters to avoid QOverload - Add process error handling Pick-to: 5.15 Change-Id: I923f44ce0eb27b7f73f9a0e16c11f48a80a0c03a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* SimpleTextViewer example: Fix documentation not showingFriedemann Kleint2020-04-243-8/+38
| | | | | | | | | | Add a path search including the application source directory, which should at least fix Qt 5.15. For educational purposes, also uses some standard paths. Pick-to: 5.15 Change-Id: I1b20bd632b604a1413d7ac66d2e419e771708562 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix some deprecation warningsFriedemann Kleint2020-04-151-1/+1
| | | | | | | | | | | findfiledialog.cpp:188:24: warning: ‘AdjustToMinimumContentsLength’ is deprecated: Use AdjustToContents or AdjustToContentsOnFirstShow [-Wdeprecated-declarations] tst_lupdate.cpp:291:63: warning: ‘void QProcess::start(const QString&, QIODevice::OpenMode)’ is deprecated: Use QProcess::start(const QString &program, const QStringList &arguments,OpenMode mode = ReadWrite) instead [-Wdeprecated-declarations] tst_qtattributionsscanner.cpp:112:63: warning: ‘void QProcess::start(const QString&, QIODevice::OpenMode)’ is deprecated: Use QProcess::start(const QString &program, const QStringList &arguments,OpenMode mode = ReadWrite) instead [-Wdeprecated-declarations] tst_qtdiag.cpp:70:27: warning: ‘void QProcess::start(const QString&, QIODevice::OpenMode)’ is deprecated: Use QProcess::start(const QString &program, const QStringList &arguments,OpenMode mode = ReadWrite) instead [-Wdeprecated-declarations] Change-Id: I103a28bd6ce97de311042f145d4a793be9d4b9a7 Pick-to: 5.15 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Migrate away from QRegExpFriedemann Kleint2020-03-191-3/+6
| | | | | | | | | | | It will be moved to Qt5Compat, avoid depending on it where not necessary. Remove usages in Qt Designer, windeployqt and examples. Change-Id: I5f5efc6999e60d995ebbc81fcaf80e7be08711b2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix links in simpletextviewer example .qhp fileKai Koehne2018-03-204-30/+30
| | | | | Change-Id: I9694fd92853c15f2eecb2bdd1b9655b05940f217 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* SimpleTextViewer example: Remove QObject::tr antipatternKai Koehne2018-01-042-2/+6
| | | | | Change-Id: I8e7d1dcf9cd2a5a1ccc563032324528fe3262611 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Assistant Examples: Use nullptrKai Koehne2017-10-043-3/+3
| | | | | Change-Id: Icfede0f02c6651aa39e2a0a9d5b586a5bb7037e9 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Assistant Examples: Unify #include styleKai Koehne2017-10-049-47/+51
| | | | | Change-Id: I72c419123e27e06ae30fa2042fb8bb6ddbab9da4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* foreach cleanup in the the smaller toolsFriedemann Kleint2016-12-221-2/+2
| | | | | | | | | Replace foreach by C++ 11 range based for in kmap2qmap, makeqpf, pixeltool, qdbus, qtattributionsscanner, qtdiag, qtplugininfo, winrtrunner and the simpletextviewer example. Change-Id: I079da84c47a1584526f4fe188377c0262419a44d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Examples: Add missing overrideAlexander Volkov2016-12-142-2/+2
| | | | | Change-Id: Ie64f892e4259fba5f1e16cf4fa3b62a2779b8bb1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Unify license header usagev5.7.0Antti Kokko2016-06-109-27/+117
| | | | | | | Updated BSD license. Change-Id: Ie2521f94a2e8ed423f989e902e5eb88512814f71 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Update copyright headersAntti Kokko2015-02-149-36/+36
| | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7f14f408e04c5c4f73a913fae153adcffbebe38f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* whitespace fixesOswald Buddenhagen2014-01-2011-51/+51
| | | | | | | | remove trailing spaces & expand tabs Change-Id: If9909c94b52d9dacb7c8735470525d18a1c97d6b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Remove all Trolltech references.kh12013-01-146-6/+6
| | | | | Change-Id: Idad55a5e6d87ea5703681e3ef11fc35ce9ff84eb Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-109-9/+9
| | | | | | | Change-Id: I9b11dc8309c9739955e3acea12b564d6ad608f59 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix examples "make install", missing the doc files.kh12013-01-101-1/+4
| | | | | Change-Id: Ifcfc888782e2087476f6f65388db5cda753e0ee7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Doc: Fix example pages for Qt ToolsLeena Miettinen2012-12-124-447/+0
| | | | | | | | | | | Use the \group and \ingroup commands to produce Qt 5 style example pages. Unify the file structure for example docs. Add example page for Qt Help and move Context Sensitive Help example to it (from the Qt Assistant Examples page). Change-Id: I687b18a134037588a5a536fe2353c18dfd44b1d7 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: David Schulz <david.schulz@digia.com>
* QtTools: Fixed install targets for examples.David Schulz2012-12-111-1/+1
| | | | | Change-Id: Id930c26beecb3e49ccfb3595bb96a03576f9cd82 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QtTools: Fix example names after adjusting exampledirsDavid Schulz2012-12-064-4/+4
| | | | | Change-Id: I00f60412346c85de044eb784a36f98a12c4ccd05 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* QtTools: Doc: Moved assistant examplesDavid Schulz2012-12-0634-0/+1729
... and changed exampledirs in the qdocconf files to the appropriate modules. Change-Id: Ic15d9fc845d59fb4e84ee39a52e457666fa09e51 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>