Re: [Yade-dev] should we drop qt4 support?

2020-03-10 Thread Janek Kozicki (yade)
Bruno Chareyre said: (by the date of Tue, 10 Mar 2020 20:42:08 +0100)
> Wow, thanks a ton for clarifying. Recently I was wondering why dragging
> with mouse did not work like before... I'll check.

OK, great! Please push the fix to
https://gitlab.com/yade-dev/trunk/-/merge_requests/438 
:-))




> Thanks
> Bruno
> 
> Le mar. 10 mars. 2020 20:28, Janek Kozicki (yade) 
> a écrit :
> 
> > Bruno Chareyre said: (by the date of Tue, 10 Mar 2020 13:10:24 +0100)
> > > That's what puzzled me in the first place. So deeply that I didn't dare
> > > replying to the question. :)
> >
> > Ah sorry, here's exactly what I meant:
> >
> > qt5/GLViewer.cpp, function postSelection() was written by Anton in
> > 2015-06-26
> >
> > qt4/GLViewer.cpp, function postSelection() was changed by Bruno in
> > 2017-05-24
> >
> > hm,hm.. Bruno, did you fix something in 2017 in postSelection? Something
> > about
> >
> > Omega::instance().getScene()->selectedBody = -1;
> >
> > And maybe at that time you were using qt4? And you were playing with
> > moving bodies around?
> >
> > If so, then maybe the "correct" version of this function is rather in qt4
> > directory?
> >
> > > Yes I think we can drop Qt4.
> > > Back to Ubuntu16 Qt5 is available.
> >
> > OK, great. That (first clang-format) merge request about QT does just
> > that. It reformats the directory and removes qt4 directory.
> >
> > However currently in tha MR there is postSelection() from qt5 version
> > by Anton from 2015-06-26. We can change that if you want :)
> >
> > best regards
> > Janek
> >
> >
> > PS: here's the full (clang-formatted) snippet:
> >
> > qt5, Anton, year 2015:
> >
> > if (selection < 0) {
> > if (last >= 0) {
> > Body::byId(Body::id_t(last))->state->blockedDOFs =
> > initBlocked;
> > last =
> > -1;
> > Omega::instance().getScene()->selectedBody   =
> > -1;
> > }
> > if (isMoving) {
> > displayMessage("Moving finished");
> > mouseMovesCamera();
> > isMoving   = false;
> > Omega::instance().getScene()->selectedBody = -1;
> > }
> > return;
> > }
> >
> > and qt4, Bruno, year 2017:
> >
> > if (selection < 0) {
> > Omega::instance().getScene()->selectedBody = -1;
> > if (last >= 0) {
> > Body::byId(Body::id_t(last))->state->blockedDOFs =
> > initBlocked;
> > last =
> > -1;
> > }
> > if (isMoving) {
> > displayMessage("Moving finished");
> > mouseMovesCamera();
> > isMoving = false;
> > }
> > return;
> > }
> >
> > Bruno's code is shorter by one line and the only difference is that
> > selectedBody = -1; is done alaways, not just inside if(…).
> >
> > Sorry about writing so much about single line. I simply compared the two
> > dirs,
> > and saw just this one difference between the two :)
> >
> >
> >
> > --
> > Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> > Gdańsk University of Technology
> > Faculty of Applied Physics and Mathematics
> > Department of Theoretical Physics and Quantum Information
> > --
> > http://yade-dem.org/
> > http://pg.edu.pl/jkozicki (click English flag on top right)
> >
> >
> >


-- 
--
Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
Gdańsk University of Technology
Faculty of Applied Physics and Mathematics
Department of Theoretical Physics and Quantum Information
--
http://yade-dem.org/
http://pg.edu.pl/jkozicki (click English flag on top right)

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] should we drop qt4 support? + clang-format ?

2020-03-10 Thread Janek Kozicki (yade)
Bruno Chareyre said: (by the date of Tue, 10 Mar 2020 13:13:47 +0100)

> Do you mean to reformat the whole repository?

yes, exactly. Sorry for so many merge requests (again). This time I
was thinking that maybe someone was working in ./core and not in ./lib
directory. Maybe I should have done just one huge MR?. I usually
exaggerate stuff to stay on the safe side ;) But these MRs are
separate dirs, they cannot be in conflict with each other.

And I am thinking that maybe we can do this reformatting now, because
I finished the high precision stuff. While doing the HP coding I had
crazy amount of interleaving branches. Reformatting at that time
wasn't possible. And I had to make so many different merge requests,
and still they were quite large (even though I did split them into as
many smaller parts for easier checking as I could).

But now HP is finished, so we could do that (from my perspective).

Provided that it is not colliding with your local code. :)

It's not a problem to close these MRs, reopen later when needed and
`git push --force` the up-to-date reformatted code. Meaning: we can
do this later if it hurts anybody now.


Vasileios Angelidakis (PGR) said: (by the date of Tue, 10 Mar 2020 13:45:59 
+)
> I don’t have any objections if you clang-format the whole repository. Can do 
> the same with my local WIP repository to avoid conflicts.

Great, thanks! Let's see what others can say about this? :)



best regards
Janek

-- 
--
Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
Gdańsk University of Technology
Faculty of Applied Physics and Mathematics
Department of Theoretical Physics and Quantum Information
--
http://yade-dem.org/
http://pg.edu.pl/jkozicki (click English flag on top right)

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] should we drop qt4 support?

2020-03-10 Thread Bruno Chareyre
Wow, thanks a ton for clarifying. Recently I was wondering why dragging
with mouse did not work like before... I'll check.
Thanks
Bruno

Le mar. 10 mars. 2020 20:28, Janek Kozicki (yade) 
a écrit :

> Bruno Chareyre said: (by the date of Tue, 10 Mar 2020 13:10:24 +0100)
> > That's what puzzled me in the first place. So deeply that I didn't dare
> > replying to the question. :)
>
> Ah sorry, here's exactly what I meant:
>
> qt5/GLViewer.cpp, function postSelection() was written by Anton in
> 2015-06-26
>
> qt4/GLViewer.cpp, function postSelection() was changed by Bruno in
> 2017-05-24
>
> hm,hm.. Bruno, did you fix something in 2017 in postSelection? Something
> about
>
> Omega::instance().getScene()->selectedBody = -1;
>
> And maybe at that time you were using qt4? And you were playing with
> moving bodies around?
>
> If so, then maybe the "correct" version of this function is rather in qt4
> directory?
>
> > Yes I think we can drop Qt4.
> > Back to Ubuntu16 Qt5 is available.
>
> OK, great. That (first clang-format) merge request about QT does just
> that. It reformats the directory and removes qt4 directory.
>
> However currently in tha MR there is postSelection() from qt5 version
> by Anton from 2015-06-26. We can change that if you want :)
>
> best regards
> Janek
>
>
> PS: here's the full (clang-formatted) snippet:
>
> qt5, Anton, year 2015:
>
> if (selection < 0) {
> if (last >= 0) {
> Body::byId(Body::id_t(last))->state->blockedDOFs =
> initBlocked;
> last =
> -1;
> Omega::instance().getScene()->selectedBody   =
> -1;
> }
> if (isMoving) {
> displayMessage("Moving finished");
> mouseMovesCamera();
> isMoving   = false;
> Omega::instance().getScene()->selectedBody = -1;
> }
> return;
> }
>
> and qt4, Bruno, year 2017:
>
> if (selection < 0) {
> Omega::instance().getScene()->selectedBody = -1;
> if (last >= 0) {
> Body::byId(Body::id_t(last))->state->blockedDOFs =
> initBlocked;
> last =
> -1;
> }
> if (isMoving) {
> displayMessage("Moving finished");
> mouseMovesCamera();
> isMoving = false;
> }
> return;
> }
>
> Bruno's code is shorter by one line and the only difference is that
> selectedBody = -1; is done alaways, not just inside if(…).
>
> Sorry about writing so much about single line. I simply compared the two
> dirs,
> and saw just this one difference between the two :)
>
>
>
> --
> Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> Gdańsk University of Technology
> Faculty of Applied Physics and Mathematics
> Department of Theoretical Physics and Quantum Information
> --
> http://yade-dem.org/
> http://pg.edu.pl/jkozicki (click English flag on top right)
>
>
>
___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] should we drop qt4 support?

2020-03-10 Thread Janek Kozicki (yade)
Bruno Chareyre said: (by the date of Tue, 10 Mar 2020 13:10:24 +0100)
> That's what puzzled me in the first place. So deeply that I didn't dare
> replying to the question. :)

Ah sorry, here's exactly what I meant:

qt5/GLViewer.cpp, function postSelection() was written by Anton in 2015-06-26

qt4/GLViewer.cpp, function postSelection() was changed by Bruno in 2017-05-24

hm,hm.. Bruno, did you fix something in 2017 in postSelection? Something about

Omega::instance().getScene()->selectedBody = -1;

And maybe at that time you were using qt4? And you were playing with moving 
bodies around?

If so, then maybe the "correct" version of this function is rather in qt4 
directory?

> Yes I think we can drop Qt4.
> Back to Ubuntu16 Qt5 is available.

OK, great. That (first clang-format) merge request about QT does just
that. It reformats the directory and removes qt4 directory.

However currently in tha MR there is postSelection() from qt5 version
by Anton from 2015-06-26. We can change that if you want :)

best regards
Janek


PS: here's the full (clang-formatted) snippet:

qt5, Anton, year 2015:

if (selection < 0) {
if (last >= 0) {
Body::byId(Body::id_t(last))->state->blockedDOFs = 
initBlocked;
last = -1;
Omega::instance().getScene()->selectedBody   = -1;
}
if (isMoving) {
displayMessage("Moving finished");
mouseMovesCamera();
isMoving   = false;
Omega::instance().getScene()->selectedBody = -1;
}
return;
}

and qt4, Bruno, year 2017:

if (selection < 0) {
Omega::instance().getScene()->selectedBody = -1;
if (last >= 0) {
Body::byId(Body::id_t(last))->state->blockedDOFs = 
initBlocked;
last = -1;
}
if (isMoving) {
displayMessage("Moving finished");
mouseMovesCamera();
isMoving = false;
}
return;
}

Bruno's code is shorter by one line and the only difference is that
selectedBody = -1; is done alaways, not just inside if(…).

Sorry about writing so much about single line. I simply compared the two dirs,
and saw just this one difference between the two :)



--
Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
Gdańsk University of Technology
Faculty of Applied Physics and Mathematics
Department of Theoretical Physics and Quantum Information
--
http://yade-dem.org/
http://pg.edu.pl/jkozicki (click English flag on top right)

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] should we drop qt4 support? + clang-format ?

2020-03-10 Thread Vasileios Angelidakis (PGR)
Hi all,

I don’t have any objections if you clang-format the whole repository. Can do 
the same with my local WIP repository to avoid conflicts.

All the best,
Vasileios

From: Yade-dev  
on behalf of Bruno Chareyre 
Sent: Tuesday, March 10, 2020 12:13:47 PM
To: Yade developers 
Subject: Re: [Yade-dev] should we drop qt4 support? + clang-format ?



On Mon, 9 Mar 2020 at 23:28, Janek Kozicki (yade) 
mailto:jkozicki-y...@pg.edu.pl>> wrote:

Since I have finished all the large modifications in master I thought about 
clang-formatting it.
But maybe somebody else has some ongoing large changes and prefers to wait with 
this?
Hi,
Do you mean to reformat the whole repository?
Hopefully someone will raise hands in such case. Vasileios maybe?
B

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] should we drop qt4 support? + clang-format ?

2020-03-10 Thread Bruno Chareyre
On Mon, 9 Mar 2020 at 23:28, Janek Kozicki (yade) 
wrote:

>
> Since I have finished all the large modifications in master I thought
> about clang-formatting it.
> But maybe somebody else has some ongoing large changes and prefers to wait
> with this?
>
Hi,
Do you mean to reformat the whole repository?
Hopefully someone will raise hands in such case. Vasileios maybe?
B
___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] should we drop qt4 support?

2020-03-10 Thread Bruno Chareyre
Hi there,

On Mon, 9 Mar 2020 at 21:53, Anton Gladky  wrote:

>
> > If we decided to remove qt4, then we need to decide which version of
> > GLViewer::postSelection(…)
>
> If we drop qt4 directory completely, then we will have only qt5-version
> of this method, right?
>

That's what puzzled me in the first place. So deeply that I didn't dare
replying to the question. :)
Yes I think we can drop Qt4.
Back to Ubuntu16 Qt5 is available.
Cheers
Bruno




>
> Am So., 8. März 2020 um 23:07 Uhr schrieb Janek Kozicki (yade)
> :
> >
> > If we decided to remove qt4, then we need to decide which version of
> > GLViewer::postSelection(…) to use, because `meld gui/qt4 gui/qt5`
> > shows that this function is the only one that differs between the two
> > directories.
> >
> >
> >
> > Janek Kozicki (yade) said: (by the date of Sun, 8 Mar 2020 22:54:07
> +0100)
> >
> > > These last two merge requests have duplicate changes in both
> directories.
> > > The changes are identical, because I did
> > >
> > >   git diff --staged > /tmp/z.patch
> > >   # edit file, replace qt5 with qt5
> > >   patch -p1 < /tmp/z.patch
> > >
> > > but having two copies of same stuff isn't healthy. Does anyone still
> use qt4?
> > >
> > > best regards
> > > Janek
> > >
> > >
> > >
> > > --
> > > Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> > > Gdańsk University of Technology
> > > Faculty of Applied Physics and Mathematics
> > > Department of Theoretical Physics and Quantum Information
> > > --
> > > http://yade-dem.org/
> > > http://pg.edu.pl/jkozicki (click English flag on top right)
> > >
> > > ___
> > > Mailing list: https://launchpad.net/~yade-dev
> > > Post to : yade-dev@lists.launchpad.net
> > > Unsubscribe : https://launchpad.net/~yade-dev
> > > More help   : https://help.launchpad.net/ListHelp
> >
> >
> > --
> > --
> > Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> > Gdańsk University of Technology
> > Faculty of Applied Physics and Mathematics
> > Department of Theoretical Physics and Quantum Information
> > --
> > http://yade-dem.org/
> > http://pg.edu.pl/jkozicki (click English flag on top right)
> >
> > ___
> > Mailing list: https://launchpad.net/~yade-dev
> > Post to : yade-dev@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~yade-dev
> > More help   : https://help.launchpad.net/ListHelp
>
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp
>


-- 
-- 
___
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53
38041 Grenoble cedex 9
Tél : +33 4 56 52 86 21


Email too brief?
Here's why: email charter

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] should we drop qt4 support? + clang-format ?

2020-03-09 Thread Janek Kozicki (yade)
Anton Gladky said: (by the date of Mon, 9 Mar 2020 21:54:04 +0100)

> If we drop qt4 directory completely, then we will have only qt5-version
> of this method, right?

Oh, right. And it was used for a long time, so it must be good :)
I have just updated that merge request and removed qt4 directory.
Fortunately we have GUI tests in the pipeline, so it should detect any
abnormalities :) (there shouldn't be any, I guess).

Since I have finished all the large modifications in master I thought about 
clang-formatting it.
But maybe somebody else has some ongoing large changes and prefers to wait with 
this?

If changes are small, then you could run:

   scripts/clang-formatter.sh $YOUR_FILE

and copy it onto the reformatted file. Then the only changes in the diff will 
be the modified lines.


best regards
Janek


> 
> Regards
> 
> Anton
> 
> Am So., 8. März 2020 um 23:07 Uhr schrieb Janek Kozicki (yade)
> :
> >
> > If we decided to remove qt4, then we need to decide which version of
> > GLViewer::postSelection(…) to use, because `meld gui/qt4 gui/qt5`
> > shows that this function is the only one that differs between the two
> > directories.
> >
> >
> >
> > Janek Kozicki (yade) said: (by the date of Sun, 8 Mar 2020 22:54:07 
> > +0100)
> >
> > > These last two merge requests have duplicate changes in both directories.
> > > The changes are identical, because I did
> > >
> > >   git diff --staged > /tmp/z.patch
> > >   # edit file, replace qt5 with qt5
> > >   patch -p1 < /tmp/z.patch
> > >
> > > but having two copies of same stuff isn't healthy. Does anyone still use 
> > > qt4?
> > >
> > > best regards
> > > Janek

-- 
--
Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
Gdańsk University of Technology
Faculty of Applied Physics and Mathematics
Department of Theoretical Physics and Quantum Information
--
http://yade-dem.org/
http://pg.edu.pl/jkozicki (click English flag on top right)

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] should we drop qt4 support?

2020-03-09 Thread Anton Gladky
Hello Janek,

I think it is a time already to drop qt4 support completely.

> If we decided to remove qt4, then we need to decide which version of
> GLViewer::postSelection(…)

If we drop qt4 directory completely, then we will have only qt5-version
of this method, right?

Regards

Anton

Am So., 8. März 2020 um 23:07 Uhr schrieb Janek Kozicki (yade)
:
>
> If we decided to remove qt4, then we need to decide which version of
> GLViewer::postSelection(…) to use, because `meld gui/qt4 gui/qt5`
> shows that this function is the only one that differs between the two
> directories.
>
>
>
> Janek Kozicki (yade) said: (by the date of Sun, 8 Mar 2020 22:54:07 +0100)
>
> > These last two merge requests have duplicate changes in both directories.
> > The changes are identical, because I did
> >
> >   git diff --staged > /tmp/z.patch
> >   # edit file, replace qt5 with qt5
> >   patch -p1 < /tmp/z.patch
> >
> > but having two copies of same stuff isn't healthy. Does anyone still use 
> > qt4?
> >
> > best regards
> > Janek
> >
> >
> >
> > --
> > Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> > Gdańsk University of Technology
> > Faculty of Applied Physics and Mathematics
> > Department of Theoretical Physics and Quantum Information
> > --
> > http://yade-dem.org/
> > http://pg.edu.pl/jkozicki (click English flag on top right)
> >
> > ___
> > Mailing list: https://launchpad.net/~yade-dev
> > Post to : yade-dev@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~yade-dev
> > More help   : https://help.launchpad.net/ListHelp
>
>
> --
> --
> Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> Gdańsk University of Technology
> Faculty of Applied Physics and Mathematics
> Department of Theoretical Physics and Quantum Information
> --
> http://yade-dem.org/
> http://pg.edu.pl/jkozicki (click English flag on top right)
>
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] should we drop qt4 support?

2020-03-08 Thread Janek Kozicki (yade)
If we decided to remove qt4, then we need to decide which version of 
GLViewer::postSelection(…) to use, because `meld gui/qt4 gui/qt5`
shows that this function is the only one that differs between the two
directories.



Janek Kozicki (yade) said: (by the date of Sun, 8 Mar 2020 22:54:07 +0100)

> These last two merge requests have duplicate changes in both directories.
> The changes are identical, because I did
> 
>   git diff --staged > /tmp/z.patch
>   # edit file, replace qt5 with qt5
>   patch -p1 < /tmp/z.patch
> 
> but having two copies of same stuff isn't healthy. Does anyone still use qt4?
> 
> best regards
> Janek
> 
> 
> 
> --
> Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> Gdańsk University of Technology
> Faculty of Applied Physics and Mathematics
> Department of Theoretical Physics and Quantum Information
> --
> http://yade-dem.org/
> http://pg.edu.pl/jkozicki (click English flag on top right)
> 
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp


-- 
--
Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
Gdańsk University of Technology
Faculty of Applied Physics and Mathematics
Department of Theoretical Physics and Quantum Information
--
http://yade-dem.org/
http://pg.edu.pl/jkozicki (click English flag on top right)

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] should we drop qt4 support?

2020-03-08 Thread Janek Kozicki (yade)
These last two merge requests have duplicate changes in both directories.
The changes are identical, because I did

  git diff --staged > /tmp/z.patch
  # edit file, replace qt5 with qt5
  patch -p1 < /tmp/z.patch

but having two copies of same stuff isn't healthy. Does anyone still use qt4?

best regards
Janek



--
Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
Gdańsk University of Technology
Faculty of Applied Physics and Mathematics
Department of Theoretical Physics and Quantum Information
--
http://yade-dem.org/
http://pg.edu.pl/jkozicki (click English flag on top right)

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp