67 Commits

Author SHA1 Message Date
Matthias Kuhn
d0feea57c1 [py3] Followup bad0d3e: Don't decode unencoded strings 2016-06-07 10:21:53 +02:00
Matthias Kuhn
bad0d3e4b6 Properly handle filsystem character encoding when showing warnings
Fix #14567
2016-06-06 20:55:22 +02:00
Denis Rouzaud
8071acd064 move PyQt compat folder to python/qgis 2016-04-29 14:10:26 +02:00
elpaso
2d3b813d22 Fixes an error when unloading plugins
Custom utils._import was never called, because
builtins was correctly imported (even if it missed __import__)
and  _import was then monkey patched to builtins instead of __builtin__

Tested on python 2
2016-03-25 12:17:58 +01:00
Matthias Kuhn
02c5637155 py2/py3 compat patches 2016-03-22 09:17:16 +01:00
Juergen E. Fischer
271750fd53 switch bindings to pyqt wrappers 2016-03-21 17:00:26 +01:00
Juergen E. Fischer
fb3fcfa3a0 Python3/Qt5/2to3 updates:
* pyqtwrappers update (add QtNetwork, QtXml, QtSql, QtTest, uic)
* 2to3 updates
* move QPyNullVariant/NULL to PyQt.QtCore
* add global unicode/basestring/long for Python3
* expand QtGui, QtCore module and star exports
* Qscintilla2
* replace Set import with set builtin
2016-03-14 20:38:20 +01:00
Juergen E. Fischer
ae52aabd70 more spelling fixes 2016-01-24 20:16:28 +01:00
elpaso
66061e0ef2 Uninstall custom excepthook for server 2015-12-16 15:13:11 +01:00
Juergen E. Fischer
b65b59596a make python error handling translatable 2015-10-23 08:29:46 +02:00
Nathan Woodrow
18df00375e Use front window to show python error if there is message bar 2015-10-23 09:36:07 +10:00
Juergen E. Fischer
e694474f62 indentation update 2015-10-03 21:42:13 +02:00
Nathan Woodrow
28196684af Show Python error stack trace when in blocking dialog 2015-10-01 22:57:27 +10:00
Nathan Woodrow
1e6c8908b2 Add stack trace button to message bar for Python errors 2015-10-01 11:54:13 +10:00
Nathan Woodrow
216821ff38 Don't spam message bar with more of the same error 2015-09-28 17:33:13 +10:00
Nathan Woodrow
6cf2dd0a4c Fix annoying blocking Python error dialog 2015-09-28 17:14:06 +10:00
Juergen E. Fischer
b39055b39c indentation update (now including autopep8) 2015-08-22 14:29:41 +02:00
Matthias Kuhn
a37b3e27d5 Remove executable flag on a bunch of files 2015-07-20 15:45:44 +02:00
Juergen E. Fischer
956c155e8f fix python pep8 warnings and fix some revealed errors
pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701 \
     --exclude="ui_*.py,debian/*,python/ext-libs/*" \
     .
2015-02-01 20:46:47 +01:00
Nathan Woodrow
7942325fd7 Remove qgsfunction from qgis.utils.
Import from qgis.core so we don't break API
2014-11-29 23:36:18 +10:00
Nathan Woodrow
e14b7e4868 Reform qgis.uitls file 2014-11-29 23:18:18 +10:00
elpaso
f2608b308f Added serve python plugins 2014-11-26 16:02:32 +01:00
Denis Rouzaud
9ebb69e70b followup 0181df555378eabbf58a29b76e687c54178ca5f1 2014-09-17 16:31:41 +02:00
Nathan Woodrow
0181df5553 Add timing for plugin loading 2014-09-18 09:38:52 +10:00
*_*
1357c14f57 Fix for http://hub.qgis.org/issues/9020 2014-06-09 04:34:18 +09:00
Juergen E. Fischer
6685932c09 show python errors in monospace 2014-03-21 09:20:48 +01:00
Juergen E. Fischer
91ecc5f31b add 'warning' to the respective python message log tab 2014-02-24 02:03:42 +01:00
Tim Sutton
ba4e438c05 Fix from Salvatore to fix project macros 2013-09-11 17:41:23 +02:00
Nathan Woodrow
b287661c91 Don't return null on failed metadata load 2013-06-12 14:26:00 +10:00
Juergen E. Fischer
8609a41deb allow utf8 in metadata.txt 2013-06-09 10:56:35 +02:00
Nathan Woodrow
e6f98362dc Merge master 2013-06-08 15:59:04 +10:00
Borys Jurgiel
eda9cd3380 [Plugin Manager] Better cope with broken plugins 2013-06-06 23:41:52 +02:00
Nathan Woodrow
17d424340e Start sipapi update 2013-05-29 22:08:16 +10:00
Tim Sutton
6c3f418988 Use ~.qgis2 and ~/.config/QuantumGIS/QGIS2.conf for settings for QGIS 2. Added unit test for memory provider. 2013-04-01 13:15:09 +02:00
Martin Dobias
32de07dc4d Remove the support for reading python plugin metadata from __init__.py
From now on, plugins must have metadata.txt file (with INI format)
that is used for storing of metadata. This has two advantages:
- plugins do not need to be loaded in order to read metadata
- repository can parse the metadata more easily
2013-03-19 00:10:51 +01:00
Martin Dobias
41dc7544d0 Do not load metadata from __init__.py 2013-03-19 00:10:51 +01:00
Juergen E. Fischer
0a0a430b0e include stack trace in logged python warning messages 2013-01-31 16:37:23 +01:00
Juergen E. Fischer
994dc1cc21 - [API] introduce QgsMessageLog::MessageLevel and change logMessage() level
parameter to that type
- change default level to WARNING
- change startup messages to INFO
- don't unhide the warning button for INFO messages
- fix warnings produced by python code
2013-01-26 14:16:39 +01:00
Juergen E. Fischer
f2029b4ec4 log python warnings and enabled deprecation warnings 2013-01-24 03:08:20 +01:00
Juergen E. Fischer
9721736fd8 remove trailing blanks 2012-12-10 00:12:07 +01:00
Nathan Woodrow
a7699e2696 [FEATURE] Add ability to create user defined Python (and C++) expression functions 2012-11-10 11:20:26 +10:00
Juergen E. Fischer
048a07a572 another copyright update 2012-10-08 00:29:13 +02:00
Juergen E. Fischer
7b4a9b68a3 add copyright notices 2012-10-04 19:36:43 +02:00
Giuseppe Sucameli
c7fcef4c1d [FEATURE] Add support to user-defined python macros into project file:
macros are executed when a project is loaded (openProject function), saved (saveProject function) or is closing (closeProject function),
macros' python code is embedded in the project file (XML),
a bar (non-blocking) is shown on the top of the canvas to ask to the user whether enable project macros.

Work done for ARPA Piemonte
2012-08-31 16:24:53 +02:00
Martin Dobias
be9bdeb5bb [FEATURE] Allow plugin metadata to be in metadata.txt
Until now plugins' metadata were always retrieved from __init__.py by calling python methods.
Reading metadata from a text file has the advantage of not requiring to load the plugin code
and can be done by plugin repository.

Metadata in metadata.txt is preferred to the methods in __init__.py - if the text file is
present, it is used to fetch the values. From QGIS 2.0 the metadata from __init__.py
will not be accepted - the metadata.txt file will be required.

Plugin metadata should be in INI file format, recognized by python's ConfigParser module
and by Qt's QSettings class.

All currently used metadata should be in [general] section. Example use:

[general]
name=PostGIS manager
description=Manage your PostGIS database
version=Version 0.5.15
icon=icons/postgis_elephant.png
qgisMinimumVersion=1.0.0
2011-11-09 15:57:17 -03:00
Jürgen E. Fischer
dcc723c067 some more svn to git migration updates/fixes 2011-05-06 16:39:45 +02:00
wonder
3a18bddada [FEATURE] Support for icons of plugins in the plugin manager dialog.
Both C++ and Python plugins now can implement icon() metadata function which returns path to the icon file name.
The icon file is passed to QPixmap() constructor. For C++ it's preferred to use an icon from the resource file
(e.g. ":/plugins/foo/foo_icon.png") because plugin's resource file gets loaded automatically when the plugin is loaded.
Python plugins can use either relative path to the icon ("images/plugin-icon.png") or icon from the resource file
(starting with a colon). The relative path is preferred, since it doesn't require the plugin to load its resource file
and plugin repository will not have a trouble to fetch the icon automatically.

Updated C++ plugins and Python plugins to include icon where applicable.

Default plugin icon is (c) Anna Shlyapnikova, licensed under Creative Commons (Attribution 3.0 Unported).


git-svn-id: http://svn.osgeo.org/qgis/trunk@14897 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-12-12 19:19:54 +00:00
wonder
d027de3655 Handle non-ascii characters in traceback when showing an exception
git-svn-id: http://svn.osgeo.org/qgis/trunk@14571 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-11-12 18:54:06 +00:00
wonder
50734ac052 Better handling of python path and plugins paths.
Additionally, plugin paths in QGIS_PLUGINPATH can be separated by either semicolon or colon.


git-svn-id: http://svn.osgeo.org/qgis/trunk@13943 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-07-20 13:06:49 +00:00
wonder
9d1d81e18f Better cleanup of resources when unloading plugins
git-svn-id: http://svn.osgeo.org/qgis/trunk@13773 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-06-21 22:26:36 +00:00