Topic: No adding of components after update

Hello,
After today's update, I cannot add any parts to the drawing (new project). If I want to insert a component in an existing project, it doesn't work either and the existing components in the drawing behave strangely (delayed)

Best regards

Stebo

Re: No adding of components after update

Hello,
i have same problem after update.

QElectroTech V 0.80-DEV+f21cdb404c957a06d79751d3
Compilation : GCC 8.3.0
Built with Qt 5.11.3 - Date : Sep 21 2020 : 05:33:56
Run with Qt 5.11.3 using 16 thread(s)
CPU : model name : AMD Ryzen 7 3700X 8-Core Processor
RAM Total : 64340 MB
RAM Available : 60606 MB
GPU : Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290/390] (rev 80)
GPU RAM : @ToDo
OS : linux - x86_64 - Version : Debian GNU/Linux 10 (buster) - Kernel : 5.8.0-1-amd64
*** Qt screens ***
( 1 : 1920 x 1200 )
( 2 : 1920 x 1200 )
( 3 : 1920 x 1200 )

Greetings
Max

3 (edited by De-Backer 2020-09-22 20:22:27)

Re: No adding of components after update

Hello,
git SHA1 id

f21cdb4040940c02b4de9d201890db55de14e6b4

i have made some changes to QRegExp.
and probably it went wrong there...

update at git SHA1 id

0a46b83dca7c4f26064a9b0101b9eeeddddaf4e3

Post's attachments

Screenshot_20200922_202142.png, 89.5 kb, 1003 x 678
Screenshot_20200922_202142.png 89.5 kb, 209 downloads since 2020-09-22 

4 (edited by Joshua 2020-09-22 20:38:05)

Re: No adding of components after update

De-Backer
I think it's a little problem.
In all your comit change the code who look like this :

QRegularExpression regexp("^.*([^/]+)\\.elmt$");
    if (regexp==QRegularExpression(m_collection_path)) {

by

    QRegularExpression regexp("^.*([^/]+)\\.elmt$");
    if (regexp.match(m_collection_path).hasMatch()) {

I think they will fix the bug for the element, and probably all other class where the regular expression was modified is bugged.
Regard joshua.

Développeur QElectroTech

Re: No adding of components after update

Debug: 1 QRegularExpression("^project([0-9]+)\\+(embed:\\/\\/.*)$", QRegularExpression::PatternOptions("CaseInsensitiveOption")) "project0+embed://import/new_element.elmt" (../qet/sources/ElementsCollection/elementslocation.cpp:247, void ElementsLocation::setPath(const QString&))
Debug: B false (../qet/sources/ElementsCollection/elementslocation.cpp:248, void ElementsLocation::setPath(const QString&))

in

QRegularExpression rx
                ("^project([0-9]+)\\+(embed:\\/\\/.*)$",
                 QRegularExpression::CaseInsensitiveOption);
        qDebug()<<"1"<<rx<<tmp_path;
        qDebug()<<"B"<<rx.match(tmp_path).hasPartialMatch();
        if (rx.match(tmp_path).hasPartialMatch())

=>

"^project([0-9]+)\\+(embed:\\/\\/.*)$"
"project0+embed://import/new_element.elmt"

6 (edited by De-Backer 2020-09-22 23:01:16)

Re: No adding of components after update

Joshua wrote:

I think they will fix the bug for the element, and probably all other class where the regular expression was modified is bugged.
Regard joshua.

yes I will have to review everything.. of QRegExp

Revert for now.

ps test

rx.match(tmp_path).hasMatch()

fails

info QRegExp
https://doc.qt.io/qt-5/qregularexpressi … t-matching

QRegularExpression re("^project(?<project_id>[0-9]+)");
        QRegularExpressionMatch match = re.match(tmp_path);
        qDebug()<< match.hasMatch()<<match.hasPartialMatch();
        if (match.hasMatch()) {
            qDebug()<< match.captured("project_id");
        }
Debug: true false
Debug: "0"

now this:

\\+(embed:\\/\\/.*)$

https://perldoc.perl.org/perlre.html
test code:

QRegularExpression re("^project(?<project_id>[0-9]+)");
        if(re.isValid()){
            QRegularExpressionMatch match = re.match(tmp_path);
            qDebug()<< match.hasMatch()<<match.hasPartialMatch();
            if (match.hasMatch()) {
                qDebug()<< match.captured("project_id");
            }
        } else {
            qDebug()<< re.errorString()<<re.patternErrorOffset();
        }

Re: No adding of components after update

David sent me this:

sur le build 6763 , lorsque l'on intégre un élément qui a de la couleur
sur un folio il perd ses couleurs.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: No adding of components after update

pattern is:

^project(?<project_id>[0-9])\+(?<collection_path>embed://*.*)$

I look for the other mistakes

Post's attachments

Screenshot_20200923_181119.png, 46.21 kb, 666 x 463
Screenshot_20200923_181119.png 46.21 kb, 231 downloads since 2020-09-23 

9 (edited by De-Backer 2020-09-23 23:12:37)

Re: No adding of components after update

Joshua wrote:

De-Backer
I think it's a little problem.
In all your comit change the code who look like this :

QRegularExpression regexp("^.*([^/]+)\\.elmt$");
    if (regexp==QRegularExpression(m_collection_path)) {

by

    QRegularExpression regexp("^.*([^/]+)\\.elmt$");
    if (regexp.match(m_collection_path).hasMatch()) {

I think they will fix the bug for the element, and probably all other class where the regular expression was modified is bugged.
Regard joshua.

ok i think i'm done
https://git.tuxfamily.org/qet/qet.git/c … 4c633d1701

edit
not nomicons/unsure

23:06:15.946 Debug: no Match "line-style:normal" (../qet/sources/factory/elementpicturefactory.cpp:584, void ElementPictureFactory::setPainterStyle(const QDomElement&, QPainter&) const)
23:06:15.946 Debug: no Match "line-weight:normal" (../qet/sources/factory/elementpicturefactory.cpp:584, void ElementPictureFactory::setPainterStyle(const QDomElement&, QPainter&) const)
23:06:15.946 Debug: no Match "filling:none" (../qet/sources/factory/elementpicturefactory.cpp:584, void ElementPictureFactory::setPainterStyle(const QDomElement&, QPainter&) const)
23:06:15.946 Debug: no Match "color:red" (../qet/sources/factory/elementpicturefactory.cpp:584, void ElementPictureFactory::setPainterStyle(const QDomElement&, QPainter&) const)

edit
ok
https://git.tuxfamily.org/qet/qet.git/c … 6a510617d5
night.

10

Re: No adding of components after update

Thanks, it works now.

Re: No adding of components after update

Max wrote:

Thanks, it works now.

Thank you for providing the git ID (from the bug version), and testing the Dev version.
Feedback is important to us (developers).