| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Qualify common enumerations. Add a separate file for this which can be
re-used in a migration tool.
Pick-to: 6.8
Task-number: PYSIDE-1735
Change-Id: Ieb30d68de82a509a92e39c40e5c7014afe3aeeb6
Reviewed-by: Ece Cinucen <ece.cinucen@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
|
|
|
|
|
|
| |
Generate "var += 1" instead of "var = var + 1".
Change-Id: Ia9b3b3e4135156ebac8b7d5b1f47c735e2be1458
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
|
|
|
|
| |
Change-Id: I91f211639846bb119d696244060f3013c52e59ed
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
|
|
|
|
|
|
| |
Task-number: PYSIDE-2620
Task-number: QTBUG-125719
Change-Id: I6efeb1770c9bd7cddc3dbd91ca6294b9fddc9cc9
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Fix a number of miscellaneous flake8 and typing issues exposed after
updating to the modern typing syntax from 3.10 onwards.
Task-number: PYSIDE-2786
Change-Id: I5476d1208dd1da3fa93bdec02bc6124a80b247fc
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can already use the modern typing syntax introduced with Python 3.10
in 3.9 via future statement definitions, even before we raise the
minimum Python version to 3.10.
Note that direct expressions with "|" don't work yet.
Task-number: PYSIDE-2786
Change-Id: Ie36c140fc960328322502ea29cf6868805a7c558
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Add a future statement to all Python source files.
Task-number: PYSIDE-2786
Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The interface was added as preliminary in qtbase commit
9d16d5e2245c26e5746fd7609300b84a2a983457 and is no longer
preliminary since qtbase commit
2496882ea71b8bc52c84e1b9c59cfd48cd56c6f2.
Pick-to: 6.7
Change-Id: I8a24aa2a7a1cd961bdc9974f41d407783ad1a82b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for functions
The code trying to change a constructor initialization:
"Foo foo(2);" into "foo = Foo(2)"
also triggered for member function definitions returning pointers
"Foo *Foo:foo()" and many function declarations in headers.
Restrict this by checking for a semicolon and non-presence of some
function qualifiers.
Pick-to: 6.5
Task-number: PYSIDE-1106
Change-Id: I224ac3e7321e57f1c5beecdcdb568a273330a664
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
|
|
|
|
|
|
|
| |
Pick-to: 6.5
Task-number: PYSIDE-1106
Change-Id: I26ef6c9631c48c1bdde852e3bb3cd222ffec1260
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When writing consecutive snippets like
// [1]
line1
// [1] [2]
line2
// [2]
the line "// [1] [2]" would appear twice as end marker of snippet 1
and start marker of snippet 2, causing QtXmlToSphinx to extract an
empty snippet for [2]. Fix by reconstructing the ID lines to use one
ID per line.
Task-number: PYSIDE-1106
Pick-to: 6.5
Change-Id: I0d7c0b30ff6bcc51c7d9ea6c9bfc844316a41c67
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Amends f9ed8662794d14b995b53c73ee18693a114e9773
Pick-to: 6.5
Task-number: PYSIDE-1106
Change-Id: I774adaa377cba4bb8745c5ab86c1f52bead2ad86
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Pick-to: 6.5
Task-number: PYSIDE-1106
Change-Id: If19ac5a962aed846e4a127c652a9bae277999807
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Extend the matching to recognize connects for member variables
(m_ui.button), remove smart pointer accessor.
Pick-to: 6.5
Task-number: PYSIDE-1106
Change-Id: Ib68df3d9d31a8de64059832c4c60ad4b20bf78e1
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Amends 088acf9aec615372b297aab701757318e94b1fb5.
Pick-to: 6.4 6.2
Task-number: PYSIDE-1106
Change-Id: I8b56874f5c686d11669b776f7398d0f9643e2bb5
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It used to generate things like "b = False()" for variable
assignments. Check the special values.
Pick-to: 6.4 6.2
Task-number: PYSIDE-1106
Change-Id: I19cdcd4205369d0d5681151b1f1243d6a9a3f81e
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a regexp to change u"s"_s to "s".
Amends 4315cfb44eaa8abd57c685390c6b9d3aff09ba0f.
Pick-to: 6.4 6.2
Task-number: PYSIDE-2151
Task-number: PYSIDE-1106
Change-Id: Id8a2cdee5966dfc4c5fbff9df6e7b9eeb7c0e436
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Display a message on top of pages that may contain automatically
translated snippets. The message warns about possible errors in
translation, and encourages readers to contribute or report errors.
Pick-to: 6.4
Fixes: PYSIDE-2111
Change-Id: Ib76c9da5e11934676ab4b102649396cb43f98b92
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Add QStringLiteral and others and handle multiple occurrences
per line better by making the patterns more discriminative.
Pick-to: 6.4 6.2
Task-number: PYSIDE-2151
Task-number: PYSIDE-1106
Change-Id: I37589dfafe27d69480db665363d5900d163014da
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Adapt to SPDX licenses, leave the old code path as is.
As a drive-by, avoid reading the snippets file twice.
Pick-to: 6.4 6.2
Task-number: PYSIDE-1106
Change-Id: Ia518124b09e22d01e37970f30605d94b86123106
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix another occurrence of opening a file.
Amends ed0f55c1d79636040843ae5c5e0d9308e35da65a.
Pick-to: 6.4
Change-Id: I7b1fa6068b620acafe51df539ad9379d922277b1
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Force UTF-8 encoding. As a drive-by, use Pathlib methods.
Complements 81d81baf0ef6c42ebdb6a2b2293d09031ce6dd5c.
Pick-to: 6.4
Change-Id: Iccdb33429a030ec76dc55699b07210cd533ba7c2
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Task-number: PYSIDE-2080
Change-Id: Id4a16e314df0f47e1a74001a23c825dbfa2956a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: If31883998a08073ecf4ca7bfb91ee000cc2f630f
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Change e48dce39c1450e73f7cdef58cfeba29e1c3b8be3 introduced a bug
appending "()" to member initalizer lists "m_member(new X()),". Fix
that by using a regexp to loop through the expressions.
Pick-to: 6.3
Change-Id: I6ce095749bcab74e92fb6dd630f25fb9fd517cc5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Use a set instead of regexps.
Pick-to: 6.3
Change-Id: If9c05fffd4f5ebb880d21cd24fafc0be5698ee66
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Pick-to: 6.3
Change-Id: Ic50c175fab1f362c4c15e12f78e5ec440784e20c
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.3
Change-Id: Ie7642f45d59839a52a650abd47383e30e508b8d3
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Precompile the regular expressions and store the stripped string.
Brings down user time from 2.3s to 2s, approximately.
Pick-to: 6.3
Change-Id: If929dc0c85cbe3e797bb3ec01eff9c434a8c5527
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Use one non-greedy regexp instead of several ones.
Pick-to: 6.3
Change-Id: I192476b5f184d22227fdd0e26ec9408098114b0e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
amends ba5fdf167b79444f210884aa01f484b5283ec67a
Pick-to: 6.3
Task-number: PYSIDE-841
Change-Id: I03e06d77ce6dce0acaef1366f9fbde1dbbe05d0c
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
| |
Task-number: PYSIDE-841
Pick-to: 6.3
Change-Id: If24127be2ab78b3542777fdf691227d51e628373
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Replace pairs of instance/pointer to member functions (PMF) by
the Python dot notation and connect statements afterwards.
Pick-to: 6.3 6.2
Task-number: PYSIDE-1721
Change-Id: I29f01d47026e3a7ab2407cf8c5b112533d5fb4dc
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Pick-to: 6.3 6.2
Task-number: PYSIDE-2030
Change-Id: Icd6f3a639449d737933d4420fbeb891224999b59
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Adapt the regexes accordingly.
Pick-to: 6.3 6.2
Fixes: PYSIDE-2030
Change-Id: I6515b2ca0fe23c753feadeb491173b72889abba5
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change c4a266e38fe5bdce707ad6b123fa88bb4f10dff3 broke
the test by changing the function values and signature.
Pick-to: 6.3 6.2
Task-number: PYSIDE-1984
Task-number: PYSIDE-2030
Change-Id: I88412f3f4398aa7fd0748d9ad3b7ba2a75cf9ff0
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add some documentation examples and snippets to fix most outstanding
C++ to Python conversion errors.
The rest looks roughly ok and could be improved by further fixing up
the snippet conversion.
Task-number: PYSIDE-1984
Pick-to: 6.3 6.2
Change-Id: I8c1bdcbc4a07847b2731ef7e2b9ba666cc00ccd6
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split a helper off the snippet extraction function taking the comment
pattern and let it return a dict by id to make it possible to replace
snippets by id.
Prototypically use it for the modelview tutorial.
Fixes: PYSIDE-1984
Task-number: PYSIDE-1952
Pick-to: 6.3 6.2
Change-Id: I05dbc3e36825761fe2968d6507880cd6f588682d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Amends 22bc41605a4dd18330a39f6346143ec55a7d6074.
Manifests as "Quoting ModelView Tutorial".
Task-number: PYSIDE-1984
Task-number: PYSIDE-1952
Pick-to: 6.3 6.2
Change-Id: Ie74080136d825adcdaf2348d2e2cd5db35ac1ff7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prototypically fix the QInputDialog dialog snippets.
Task-number: PYSIDE-1984
Fixes: PYSIDE-1952
Pick-to: 6.3 6.2
Change-Id: Iad75971b8778a6364123963d28f54f02a0c56737
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adapt to get_snippets() returning a list after
168f0c941cefe2fcdaaa12498272f181fe246986:
File "pyside-setup-devt/tools/snippets_translate/converter.py", line 21, in snippet_translate
if x.strip().startswith("content-type: text/html"):
AttributeError: 'list' object has no attribute 'strip'
Pick-to: 6.3 6.2
Change-Id: I3366b6fcf7647e24cf50ad7afe1f62ff0d04f9e2
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Including option to process the snippets inside
a directory, and refactoring the general script
to adapt this option.
Initial-Patch-by: Jaime Resano <gemailpersonal02@gmail.com>
Pick-to: 6.2 6.3
Change-Id: I629be8b7c13bc0445279ced73c3159800cd0644d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
- Fixed the get_snippets function which did not work properly
when more than one snippet id was on the same line.
- Tests were added
Pick-to: 6.2 6.3
Change-Id: Idffbb0aee258522d7855e2ad0e2b8df61a1872c8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Earlier, double colons were converted to dot operator only when the
statement had a QObject class or namespace. For cases with a normal C++
namespace like MyClass::x, it was still translated without modifications
to Python.
- This patch adds an extra statement at the end of snippet_translate(x)
to convert all the remaining scope resolution to dot operator
On top of the above changes, it also addresses a FIXME to handle C++
iterator declaration in Python
Task-number: PYSIDE-1972
Pick-to: 6.3
Change-Id: I45d12954835aaa569d1a4ef15badb366eaff0fe7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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: I065150015bdb84a3096b5b39c061cf0a20ab637d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
| |
Change-Id: I8cbf5d521900df4f55abf8f68997f8a71437f722
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: Ib318e8f90dda38566da11877ab52f32eba4762f6
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Some examples(queuedcustomtype, codeeditor) use '//![snippet]'.
Change-Id: If13fd12f8eff8a41a3b8e4f74a7bf3a03c8b39b3
Pick-to: 6.2
Task-number: PYSIDE-1721
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This is no longer necessary since the snippets have been removed from
the repository. Generate them directly into the build directory.
Pick-to: 6.2
Task-number: PYSIDE-1721
Change-Id: I0a4d9bc3c466b689fa28a982f608104cc5936570
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change snippets_translate to replicate the complete Qt tree
including module name under the codesnippet directory.
Resolving the snippet is then a matter of replacing
the Qt source path by the PySide 6 snippet path in the fallback
paths contained in WebXML and checking for the converted .py
files.
This basically reduces the snippet warnings to 0.
Pick-to: 6.2
Task-number: PYSIDE-1721
Change-Id: I344004ddd1580f96ebf0c132923388ad08852374
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|