Re: [QGIS-Developer] cdash issues?

2019-07-21 Thread Nyall Dawson
On Sun, 21 Jul 2019 at 09:55, Alexis R.L.  wrote:
>
> Greetings,
>
> I'm trying to check the image generated by my tests and I noticed that the 
> cdash log was quite empty. I also noticed that the provided tinyurl link at 
> the end of the build lead to a 500 error.
>
> I'm not sure what is going on recently with cdash or if the move away from 
> cdash is intended.
>
> Does anyone know what might be going on or is it only on my end?

It was moved recently to https://cdash.orfeo-toolbox.org/index.php?project=QGIS

The link at the bottom of Travis results is still broken so you need
to manually go to dash to fetch results.

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] DBManager save querys only saves selected code - Bug or Feature?

2019-07-21 Thread Nyall Dawson
On Sun, 21 Jul 2019 at 18:29, Matthias Kuhn  wrote:
>
> Hi,
>
> Is there any other software with this behavior to "save only selected"? Or a 
> use case where this is desirable?
>
> From top of my mind I can't find anything and I think all our other editors 
> always save the full text, regardless of selection.

+1 to that. If a user really needs to save only a selected portion I
think it's fine to require them to copy that part to a text editor and
save from there. I'd rather not overload the UI with two options "save
all"/"save selected bit only", it's just overkill.

Nyall


>
> Regards
>
> Matthias
>
> On 7/21/19 10:19 AM, Alexandre Neto wrote:
>
> I agree that it can be a feature, but needs to be more explicit to the user.
>
> My problem is that I was creating several instructions and running them one 
> by one. Then, in the end, I wanted to save everything and didn't realize that 
> there was a selection.
>
> Documentation alone won't be enough IMHO. So, maybe a check box with "Save 
> selected only?
>
> Anyway, thanks for making saving available.
>
> Alex
>
> A Sáb, 20/07/2019, 18:27, Loïc Bartoletti  
> escreveu:
>>
>> Hi Alexandre,
>>
>> It's my bad, I used _getSqlQuery insted of self.editSql.text().
>>
>> For me a feature must be documented and for this one the user must have the 
>> choice between the full text or the selected part. So it's a bug or I add 
>> this option and the doc.
>>
>> Regards,
>>
>> Loïc
>>
>> Le 20/07/2019 à 17:04, Alexandre Neto a écrit :
>>
>> Hi,
>>
>> I had some frustrations with the DB Manager save query functionality. At 
>> some point I finally understood that, if there is some selected code, only 
>> that part is saved.
>>
>> To me it's weird, because when you save, the rest of the code is maintained 
>> in the SQL editor, and the name of the query is showned in the topo.
>>
>> But, when I turn of my project and open it again, surprise surprise, only 
>> the selected part is in the Query.
>>
>> Bug or feature?
>>
>> Alex Neto
>>
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Difficulties with custom bad layer handler in plugin code

2019-07-21 Thread Nyall Dawson
On Sun, 21 Jul 2019 at 21:16, Áron Gergely  wrote:

> This actually works, for the 1st time when I open a project file with bad 
> layers. Then the 2nd time, QGIS always crashes.
> It seems once I replaced the bad layer handler during project start, QGIS is 
> not able to open a subsequent new project properly.

Couldn't you achieve the same result by setting your bad layer handler
directly in initGui?

># TODO: after this, call the GUI file dialog as in the default bad layer 
>handler, to allow the user to fix
># any other broken layers... not sure how to do this

The bad news is -- unfortunately you cannot. The inbuilt bad layer
handler isn't exposed to Python in any way, and as soon as you set a
new bad layer
handler method the existing inbuilt one is completely deleted.

I've been thinking about a similar situation recently, where a
client's IT department is continually replacing network paths and
moving things around (they do it roughly every 6 months, with no
notice in advance. yep.) This breaks many many paths in their qgis
projects, but the fix is actually super simple since we know what the
network path used to be and what it is now. So what I've been
pondering is whether we need a new hook to allow a "data source
pre-processor" function to be specified, much in the same way that
custom bad layer handlers would be. This would be called BEFORE
resolving any raw paths, and would simply take an input data source
string and return a processed version of it. (e.g. by replacing
outdated network paths with their new equivalent). In this way it
would be transparent to users -- the paths would be automatically
updated, and then they'd only see the bad layer handler dialog IF an
updated path still doesn't exist.

Does this sound like what you're seeking?

Nyall



>
> Here is my example in code:
>
> class MyBadLayerHandler(QgsProjectBadLayerHandler):
> """
> This is a custom bad layer handler that would work as the default one, 
> except it would automatically fix
> a specific layer that is broken.
> """
>
> def __init__(self, path):
> QgsProjectBadLayerHandler.__init__(self)
> self.validLayerPath = path
>
> def handleBadLayers(self, domNodes):
> # Some logic to look for a specific DomNode to fix, oversimplified 
> here:
> for dom in domNodes:
> dataSource = self.dataSource(dom)
>
> if dataSource is 'the broken path to the layer I want to fix':
> # set correct data source then force re-read
> self.setDataSource(domNodes, self.validLayerPath)
> QgsProject.instance().readLayer(dom)
>
> # TODO: after this, call the GUI file dialog as in the default bad 
> layer handler, to allow the user to fix
> # any other broken layers... not sure how to do this
>
>
> class MyPlugin:
> """My plugin"""
>
> def __init__(self):
> self.validPath = 'valid path to layer'
> self.badLayerHandler = None
>
> def hackyAndUglyReplacer(self, i, n):
> """
> This hacky ugly function is to replace the bad layer handler early 
> on, before any layers would be loaded.
> it is meant to be connected to the `layerLoaded` signal of 
> `QgsProject`
> """
> # do not run further if there were other layers loaded before (e.g. 
> the signal was emitted before)
> if i != 0:
> return
>
> if not self.badLayerHandler:
> self.badLayerHandler = MyBadLayerHandler(self.validPath)
> QgsProject.instance().setBadLayerHandler(self.badLayerHandler)
>
> def initGui(self):
> # start-up code here...
>
> #connect to signal
> QgsProject.instance().layerLoaded.connect(self.hackyAndUglyReplacer)
>
> def unload(self):
> try:
> QgsProject.instance().layerLoaded.disconnect()
> except Exception:
> pass
>
>
> Does anyone know what am I doing wrong here? Have I missed something?
> Why does QGIS crash every 2nd time?
>
> I would be happy to pass the bad layer handler a better way than with the 
> current signal above. But the other signals I found are emitted 'too late' 
> already.
> Perhaps here I am also doing something wrong?
>
> I tried looking for help but the web barely has any trace of documentation on 
> this.
>
> I also tried to see how this is done in other plugins e.g. the 
> changeDataSource plugin, but the authors  seem to have removed the code when 
> they ported the plugin to QGIS 3.x
> (perhaps a bad sign)
>
> In general it seems to me this part was also overhauled in QGIS3 but there 
> aren't many leads to follow on what is the current way of using custom bad 
> layer handlers.
>
> Maybe if we could put the story together on how to do this correctly, I could 
> document it and put it on the web for others to refer to.
>
> Hope you are having / had a great Sunday!
>
> Best regards,
> Aron
>
> 

Re: [QGIS-Developer] GSoC QGIS 3D Improvement: Week 8 Report

2019-07-21 Thread Tim Sutton
Hi Sunni

Thanks for the update! Maybe I missed it, but what is planned to eventually go 
in the billboard? The kid pic is nice for a proof of concept but have you made 
a concept render of the how the final thing will look? It would be nice for the 
billboard to use the tooltip text or the label text - it that the plan? I’m 
still not convinced it wouldn’t be better having the billboard facing a fixed 
(or used defined fixed) direction but maybe I am alone in this….when I watch 
the youtube clip the boards seem to go ‘flat on the ground’ and lose their 3d 
representation. 

Regards

Tim

> On 21 Jul 2019, at 19:47, Ismail Sunni  wrote:
> 
> Dear QGIS developers,
> 
> Here is my 8th-week report for my GSoC Project[4]. You can also check the 
> project wiki page [2]. Comments and suggestions are welcome :)
> 
> 
> GSoC QGIS 3D Improvement Week 8 Report
> 
> Period: 15 July 2019 - 21 July 2019
> 
> Report
> 1. What did I complete this week?
>- Porting Billboard functionality from my experimental repo[3] to QGIS 
> codebase[1]. Success with a static image, and currently polishing with 
> default symbol (still looks ugly symbol).
>Sample result can be watched below (click and it will play on YouTube):
> - QGIS 3D Billboard Rendering with Succes Kid (static) 
> (http://www.youtube.com/watch?v=Dxsu0ZaDd0k 
> )
> - QGIS 3D Billboard Rendering with Default QgsSymbol - still ugly 
> (http://www.youtube.com/watch?v=32Tv7y07vXg 
> )   
> 2. What am I going to achieve for next week?
>- Make the billboard shows symbol from user
>- Polishing
>- Fill 2nd evaluation
> 3. Is there any blocking issue?
>- It seems, adding an image (not from a file) to the texture is not 
> straight forward.
> 4. Code
>- Branch for billboard feature [1]
>- Repo for QT C++ billboard [3]
> 5. Misc
>- N/A
> 
> ## References
> - [1] https://github.com/ismailsunni/QGIS/tree/billboard 
> 
> - [2] Project Wiki: 
> https://github.com/ismailsunni/QGIS/wiki/GSoC-2019---QGIS-3D-Improvement 
> 
> - [3] https://github.com/ismailsunni/qt3d-custom-shader 
> 
> - [4] https://github.com/ismailsunni/QGIS/wiki/Week-8-Report 
> 
> 
> Best regards
> -- 
> Ismail Sunni
> ismailsunni.wordpress.com 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

—









Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com  to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net

I'd love to connect. Here's my calendar link  to 
make finding time easy.

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] GSoC QGIS 3D Improvement: Week 8 Report

2019-07-21 Thread Ismail Sunni
Dear QGIS developers,

Here is my 8th-week report for my GSoC Project[4]. You can also check the
project wiki page [2]. Comments and suggestions are welcome :)


GSoC QGIS 3D Improvement Week 8 Report

*Period*: 15 July 2019 - 21 July 2019

*Report*
1. What did I complete this week?
   - Porting Billboard functionality from my experimental repo[3] to QGIS
codebase[1]. Success with a static image, and currently polishing with
default symbol (still looks ugly symbol).
   Sample result can be watched below (click and it will play on YouTube):
- QGIS 3D Billboard Rendering with Succes Kid (static) (
http://www.youtube.com/watch?v=Dxsu0ZaDd0k)
- QGIS 3D Billboard Rendering with Default QgsSymbol - still ugly (
http://www.youtube.com/watch?v=32Tv7y07vXg)
2. What am I going to achieve for next week?
   - Make the billboard shows symbol from user
   - Polishing
   - Fill 2nd evaluation
3. Is there any blocking issue?
   - It seems, adding an image (not from a file) to the texture is not
straight forward.
4. Code
   - Branch for billboard feature [1]
   - Repo for QT C++ billboard [3]
5. Misc
   - N/A

## References
- [1] https://github.com/ismailsunni/QGIS/tree/billboard
- [2] Project Wiki:
https://github.com/ismailsunni/QGIS/wiki/GSoC-2019---QGIS-3D-Improvement
- [3] https://github.com/ismailsunni/qt3d-custom-shader
- [4] https://github.com/ismailsunni/QGIS/wiki/Week-8-Report

Best regards
-- 
Ismail Sunni
ismailsunni.wordpress.com
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Difficulties with custom bad layer handler in plugin code

2019-07-21 Thread Áron Gergely

Hello to all contributors,

I am trying to implement a custom bad layer handler that I would ship 
with a plugin (for QGIS 3.4 and above).


The plugin creates map layouts and places a default world map layer in 
them, which we ship with the plugin.
However when users shave the project file and share it among each other, 
many find this layer to be broken.
The layer points to a data in the plugin path, which is not the same 
across machines.


The custom bad layer handler would try to see if this specific layer is 
broken and fix it for the user,
then call the regular bad layer handling "file dialog" to allow them to 
fix any eventual broken layers that are unrelated to the plugin.


I am creating my bad layer handler by subclassing QgsProjectBadLayerHandler,
thin I pass it to QgsProject by calling its setBadLayerHandler() method.
Since I want to pass it before any layer is actually loaded (so when 
launching qgis to open a project file, it would work right away)
I had to resort to a sort of ugly way of using the 
QgsProject.layerLoaded signal to make this happen.


This actually works, for the 1st time when I open a project file with 
bad layers. Then the 2nd time, QGIS always crashes.
It seems once I replaced the bad layer handler during project start, 
QGIS is not able to open a subsequent new project properly.


Here is my example in code:

class MyBadLayerHandler(QgsProjectBadLayerHandler):
""" This is a custom bad layer handler that would work as the default 
one, except it would automatically fix a specific layer that is broken. 
""" def __init__(self, path):

QgsProjectBadLayerHandler.__init__(self)
self.validLayerPath = path

def handleBadLayers(self, domNodes):
# Some logic to look for a specific DomNode to fix, oversimplified here: 
for domin domNodes:

dataSource =self.dataSource(dom)

if dataSourceis 'the broken path to the layer I want to fix':
# set correct data source then force re-read 
self.setDataSource(domNodes, self.validLayerPath)
QgsProject.instance().readLayer(dom)

# TODO: after this, call the GUI file dialog as in the default bad layer 
handler, to allow the user to fix # any other broken layers... not sure 
how to do this class MyPlugin:

"""My plugin""" def __init__(self):
self.validPath ='valid path to layer' self.badLayerHandler =None def 
hackyAndUglyReplacer(self, i, n):
""" This hacky ugly function is to replace the bad layer handler early 
on, before any layers would be loaded. it is meant to be connected to 
the `layerLoaded` signal of `QgsProject` """ # do not run further if 
there were other layers loaded before (e.g. the signal was emitted 
before) if i !=0:

return if not self.badLayerHandler:
self.badLayerHandler = MyBadLayerHandler(self.validPath)
QgsProject.instance().setBadLayerHandler(self.badLayerHandler)

def initGui(self):
# start-up code here... #connect to signal 
QgsProject.instance().layerLoaded.connect(self.hackyAndUglyReplacer)

def unload(self):
try:
QgsProject.instance().layerLoaded.disconnect()
except Exception:
pass


Does anyone know what am I doing wrong here? Have I missed something?
Why does QGIS crash every 2nd time?

I would be happy to pass the bad layer handler a better way than with 
the current signal above. But the other signals I found are emitted 'too 
late' already.

Perhaps here I am also doing something wrong?

I tried looking for help but the web barely has any trace of 
documentation on this.


I also tried to see how this is done in other plugins e.g. the 
changeDataSource plugin, but the authors  seem to have removed the code 
when they ported the plugin to QGIS 3.x

(perhaps a bad sign)

In general it seems to me this part was also overhauled in QGIS3 but 
there aren't many leads to follow on what is the current way of using 
custom bad layer handlers.


Maybe if we could put the story together on how to do this correctly, I 
could document it and put it on the web for others to refer to.


Hope you are having / had a great Sunday!

Best regards,
Aron

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] DBManager save querys only saves selected code - Bug or Feature?

2019-07-21 Thread Etienne Trimaille
There is already a ticket: https://github.com/qgis/QGIS/issues/30616

Le dim. 21 juil. 2019 à 11:11, Paolo Cavallini  a
écrit :

> Hi all.
> I agree, the default should be save all. Having the option of savings only
> selected could be handy.
> Cheers.
>
> On 21 July 2019 10:29:21 CEST, Matthias Kuhn  wrote:
>>
>> Hi,
>>
>> Is there any other software with this behavior to "save only selected"?
>> Or a use case where this is desirable?
>>
>> From top of my mind I can't find anything and I think all our other
>> editors always save the full text, regardless of selection.
>>
>> Regards
>>
>> Matthias
>> On 7/21/19 10:19 AM, Alexandre Neto wrote:
>>
>> I agree that it can be a feature, but needs to be more explicit to the
>> user.
>>
>> My problem is that I was creating several instructions and running them
>> one by one. Then, in the end, I wanted to save everything and didn't
>> realize that there was a selection.
>>
>> Documentation alone won't be enough IMHO. So, maybe a check box with
>> "Save selected only?
>>
>> Anyway, thanks for making saving available.
>>
>> Alex
>>
>> A Sáb, 20/07/2019, 18:27, Loïc Bartoletti 
>> escreveu:
>>
>>> Hi Alexandre,
>>>
>>> It's my bad, I used _getSqlQuery
>>> 
>>> insted of self.editSql.text().
>>>
>>> For me a feature must be documented and for this one the user must have
>>> the choice between the full text or the selected part. So it's a bug or I
>>> add this option and the doc.
>>>
>>> Regards,
>>>
>>> Loïc
>>> Le 20/07/2019 à 17:04, Alexandre Neto a écrit :
>>>
>>> Hi,
>>>
>>> I had some frustrations with the DB Manager save query functionality. At
>>> some point I finally understood that, if there is some selected code, only
>>> that part is saved.
>>>
>>> To me it's weird, because when you save, the rest of the code is
>>> maintained in the SQL editor, and the name of the query is showned in the
>>> topo.
>>>
>>> But, when I turn of my project and open it again, surprise surprise,
>>> only the selected part is in the Query.
>>>
>>> Bug or feature?
>>>
>>> Alex Neto
>>>
>>> ___
>>> QGIS-Developer mailing listqgis-develo...@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>> ___
>> QGIS-Developer mailing listqgis-develo...@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
> --
> Sorry for being short
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] DBManager save querys only saves selected code - Bug or Feature?

2019-07-21 Thread Paolo Cavallini
Hi all.
I agree, the default should be save all. Having the option of savings only 
selected could be handy.
Cheers.

On 21 July 2019 10:29:21 CEST, Matthias Kuhn  wrote:
>Hi,
>
>Is there any other software with this behavior to "save only selected"?
>
>Or a use case where this is desirable?
>
> From top of my mind I can't find anything and I think all our other 
>editors always save the full text, regardless of selection.
>
>Regards
>
>Matthias
>
>On 7/21/19 10:19 AM, Alexandre Neto wrote:
>> I agree that it can be a feature, but needs to be more explicit to
>the 
>> user.
>>
>> My problem is that I was creating several instructions and running 
>> them one by one. Then, in the end, I wanted to save everything and 
>> didn't realize that there was a selection.
>>
>> Documentation alone won't be enough IMHO. So, maybe a check box with 
>> "Save selected only?
>>
>> Anyway, thanks for making saving available.
>>
>> Alex
>>
>> A Sáb, 20/07/2019, 18:27, Loïc Bartoletti > > escreveu:
>>
>> Hi Alexandre,
>>
>> It's my bad, I used _getSqlQuery
>>
>
>> insted of self.editSql.text().
>>
>> For me a feature must be documented and for this one the user
>must
>> have the choice between the full text or the selected part. So
>> it's a bug or I add this option and the doc.
>>
>> Regards,
>>
>> Loïc
>>
>> Le 20/07/2019 à 17:04, Alexandre Neto a écrit :
>>> Hi,
>>>
>>> I had some frustrations with the DB Manager save query
>>> functionality. At some point I finally understood that, if there
>>> is some selected code, only that part is saved.
>>>
>>> To me it's weird, because when you save, the rest of the code is
>>> maintained in the SQL editor, and the name of the query is
>>> showned in the topo.
>>>
>>> But, when I turn of my project and open it again, surprise
>>> surprise, only the selected part is in the Query.
>>>
>>> Bug or feature?
>>>
>>> Alex Neto
>>>
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org 
>
>>> List
>info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>
>> List info:
>https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe:
>https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
Sorry for being short___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] DBManager save querys only saves selected code - Bug or Feature?

2019-07-21 Thread Matthias Kuhn

Hi,

Is there any other software with this behavior to "save only selected"? 
Or a use case where this is desirable?


From top of my mind I can't find anything and I think all our other 
editors always save the full text, regardless of selection.


Regards

Matthias

On 7/21/19 10:19 AM, Alexandre Neto wrote:
I agree that it can be a feature, but needs to be more explicit to the 
user.


My problem is that I was creating several instructions and running 
them one by one. Then, in the end, I wanted to save everything and 
didn't realize that there was a selection.


Documentation alone won't be enough IMHO. So, maybe a check box with 
"Save selected only?


Anyway, thanks for making saving available.

Alex

A Sáb, 20/07/2019, 18:27, Loïc Bartoletti > escreveu:


Hi Alexandre,

It's my bad, I used _getSqlQuery


insted of self.editSql.text().

For me a feature must be documented and for this one the user must
have the choice between the full text or the selected part. So
it's a bug or I add this option and the doc.

Regards,

Loïc

Le 20/07/2019 à 17:04, Alexandre Neto a écrit :

Hi,

I had some frustrations with the DB Manager save query
functionality. At some point I finally understood that, if there
is some selected code, only that part is saved.

To me it's weird, because when you save, the rest of the code is
maintained in the SQL editor, and the name of the query is
showned in the topo.

But, when I turn of my project and open it again, surprise
surprise, only the selected part is in the Query.

Bug or feature?

Alex Neto

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org  
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org 
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] DBManager save querys only saves selected code - Bug or Feature?

2019-07-21 Thread Alexandre Neto
I agree that it can be a feature, but needs to be more explicit to the user.

My problem is that I was creating several instructions and running them one
by one. Then, in the end, I wanted to save everything and didn't realize
that there was a selection.

Documentation alone won't be enough IMHO. So, maybe a check box with "Save
selected only?

Anyway, thanks for making saving available.

Alex

A Sáb, 20/07/2019, 18:27, Loïc Bartoletti 
escreveu:

> Hi Alexandre,
>
> It's my bad, I used _getSqlQuery
> 
> insted of self.editSql.text().
>
> For me a feature must be documented and for this one the user must have
> the choice between the full text or the selected part. So it's a bug or I
> add this option and the doc.
>
> Regards,
>
> Loïc
> Le 20/07/2019 à 17:04, Alexandre Neto a écrit :
>
> Hi,
>
> I had some frustrations with the DB Manager save query functionality. At
> some point I finally understood that, if there is some selected code, only
> that part is saved.
>
> To me it's weird, because when you save, the rest of the code is
> maintained in the SQL editor, and the name of the query is showned in the
> topo.
>
> But, when I turn of my project and open it again, surprise surprise, only
> the selected part is in the Query.
>
> Bug or feature?
>
> Alex Neto
>
> ___
> QGIS-Developer mailing listqgis-develo...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer