Commit Graph

2443 Commits

Author SHA1 Message Date
Michael Wiencek
fed4022da4 Fix issue related to QSettings saving booleans as strings 2014-01-20 00:04:20 -06:00
Michael Wiencek
b9b6bfe8fb Fix deadlock introduced in c50cdf7 2014-01-19 23:03:40 -06:00
Michael Wiencek
c50cdf7e42 Return the default Option value on TypeError
Apparently Qt saves empty QStringLists as @Invalid, which sip converts
to None in Python. Which throws a TypeError when fed back into list.
2014-01-19 22:50:35 -06:00
Michael Wiencek
e781183297 Add .DS_Store to .gitignore 2014-01-19 22:31:56 -06:00
Michael Wiencek
547475f62b Revert 68bf155, use different solution
68bf155 was overzealous in removing the conversion routines because
although sip does convert the values for us, that doesn't help if the
wrong type is already saved (hence why we're converting it in the
first place...).

This adds back that functionality. To solve the upgrade hook issue,
a `raw_value` method is added to the ConfigSection class so that
`__getitem__` isn't invoked during the upgrade (which is what wrongly
converted the value to begin with).
2014-01-19 22:30:28 -06:00
Michael Wiencek
f75206afdf Merge pull request #1 from zas/listoptions
Improve hooks documentation and debug output, fix few issues
2014-01-18 23:43:05 -08:00
Laurent Monin
5c5a5ea51d Output hooks docstrings to log.debug
Example of output:
```
D: 10:57:46 Config upgrade 1.3.0dev1 -> 1.3.0dev2: Option "preserved_tags" is now using comma instead of spaces as tag separator (PICARD-536)
```
2014-01-18 10:59:02 +01:00
Laurent Monin
7ce80a21ea Shorten lines using intermediate variables 2014-01-18 10:54:56 +01:00
Laurent Monin
8d86e61912 Moved info about the change to function's doc
As discussed with @mwiencek, we don't need to expose those to average user,
nor to mark those for translations.
2014-01-18 10:54:56 +01:00
Laurent Monin
3c07627472 Do not try to upgrade option if not needed.
It fixes the following exception, when starting without any pre-existing configuration file:
```
  File "./picard/config_upgrade.py", line 106, in upgrade_to_v1_3_0_dev_3
    _s["preferred_release_countries"].split("  ")
AttributeError: 'list' object has no attribute 'split'
```
2014-01-18 10:32:29 +01:00
Michael Wiencek
f9031211e2 Convert QByteArray to unicode to fix exception 2014-01-17 04:16:44 -06:00
Michael Wiencek
68bf155ef0 Remove type conversion functionality from Options
Automatically converting the type is problematic, because if we change
the type of an option later (imagine str -> list), it'll pass the old
value to the new type constructor before any upgrade hooks are run.
With 6ff1f53, there shouldn't be any need to convert the types anyway
because sip now does that for us.

The 'convert' functionality has been repurposed here for actual format
conversions. As it happens, the only Option that needs that is the
password field (rot13).
2014-01-17 03:58:45 -06:00
Michael Wiencek
bae1672ef1 Fix tests in light of 6ff1f53 2014-01-16 19:38:15 -06:00
Michael Wiencek
6ff1f5350f Nuke QVariant, QString in favor of Python types 2014-01-16 19:18:35 -06:00
Laurent Monin
879fd9b5c7 Merge pull request #211 from Sophist-UK/sophist_fix_nat_refresh
Fix errors on refresh of NAT track (PICARD-549)
2014-01-13 02:27:07 -08:00
Sophist
1d7ccf4461 Apply patch provided by zas 2014-01-13 10:13:53 +00:00
Laurent Monin
427a1e666f Merge pull request #210 from zas/test_exit_code
Ensure setup.py returns non-zero exit code on test failure
2014-01-12 02:18:44 -08:00
Laurent Monin
2be60fae33 Returns exit code 1 if at least one test failed.
It should make travis-ci to report test failures when they actually fail.
Ie. build 169.1 has test failures, but build was happily reported as Passed,
this patch should change this.
2014-01-12 11:08:06 +01:00
Laurent Monin
0f9b04324c Fix AttributeError: 'MetadataBox' object has no attribute 'shrink_columns'
shrink_columns() was replaced by resize_columns() in commit 4c64a277cd
2014-01-10 14:52:29 +01:00
Michael Wiencek
4a4c9960a7 Merge pull request #188 from mwiencek/artists-tag
Support the Jaikoz 'artists' tag, which stores individual artist names
2014-01-09 12:21:29 -08:00
Michael Wiencek
fbbadc8f9d Merge branch 'master' into artists-tag
Conflicts:
	NEWS.txt
2014-01-09 14:21:04 -06:00
Michael Wiencek
3c0e588bbc Update NEWS.txt 2014-01-09 14:20:10 -06:00
Laurent Monin
9747a46780 Remove extra imports 2014-01-09 15:54:03 +01:00
Laurent Monin
d779fdc8d3 Merge pull request #208 from xlotlu/filenaming
updated tests for filename shortening (which now returns relative paths)
2014-01-07 08:16:47 -08:00
Ionuț Ciocîrlan
156aeda8a0 updated tests for filename shortening (which now returns relative paths) 2014-01-07 17:59:50 +02:00
Laurent Monin
08ce08caa2 Merge pull request #187 from zas/picard528
PICARD-528: ignore file paths if hidden or excluded by regex
2014-01-06 16:34:06 -08:00
Laurent Monin
8c2628638a Merge pull request #207 from olea/patch-1
Update copyright year in About
2014-01-06 16:31:16 -08:00
Ismael Olea
0d04cbdf8a Update about.py
updated copyright dates
2014-01-06 17:11:27 +01:00
Laurent Monin
cbcbc73408 Update README.md
Typo fix
2014-01-06 11:25:27 +01:00
Laurent Monin
3e83308357 Regenerate picard.pot 2014-01-05 14:01:09 +01:00
Laurent Monin
a8fa19588d Drop useless spaces in button label
It is problematic when it comes to i18n and is useless here.
2014-01-05 13:38:03 +01:00
Laurent Monin
f942b71fe6 Merge pull request #206 from xlotlu/filenaming
PICARD-540: return relative paths for shortened filenames
2014-01-04 12:59:33 -08:00
Ionuț Ciocîrlan
0a1b97732b PICARD-540: return relative paths for shortened filenames 2014-01-04 21:43:39 +02:00
Laurent Monin
45b9619b4c Regenerate picard.pot 2014-01-02 18:11:52 +01:00
Laurent Monin
a337e70bee Merge pull request #203 from zas/upgradepath3
Drop upgrade hook autodetection
2014-01-02 08:56:34 -08:00
Laurent Monin
1de7f3fa55 Update comment 2014-01-02 17:50:31 +01:00
Laurent Monin
861ed91800 Mark messages for translation. 2014-01-02 17:47:02 +01:00
Laurent Monin
d713d1cf00 Let version_from_string() raises an exception if hook name is incorrect 2014-01-02 17:36:29 +01:00
Laurent Monin
c2d53a4d4d version_from_string(): match end of the string instead full string 2014-01-02 17:32:34 +01:00
Laurent Monin
6e889ca0a0 Use exceptions in place of assertions -> VersionError 2014-01-02 17:28:41 +01:00
Laurent Monin
22271d880c Remove useless intermediate variable 2014-01-02 17:09:28 +01:00
Laurent Monin
708faa9ba4 _upgrade_hooks is now a dict, with version as key 2014-01-02 14:23:34 +01:00
Laurent Monin
57732ce17b Un-indent upgrade functions 2014-01-02 13:00:40 +01:00
Laurent Monin
d0005ccac9 Drop autodetection of hooks, but still extract version from hook name 2014-01-02 11:52:15 +01:00
Laurent Monin
81ec25afcd Make version_from_string() more tolerant 2014-01-02 11:50:51 +01:00
Laurent Monin
69f59348c1 Add a README.md 2014-01-02 03:38:59 +01:00
Laurent Monin
1f5c150f74 Merge pull request #202 from zas/upgradepath2
Improve and fix upgrade hooks code
2014-01-01 18:24:21 -08:00
Laurent Monin
432ef5b996 Log explicit messages for config upgrades and drop now useless comments
Use log.info() instead of log.debug() as it is useful for any user to know
config options were modified.
2014-01-02 03:20:25 +01:00
Laurent Monin
ef07fc2e90 Move upgrade code to its own file, no need to be a Tagger method 2014-01-02 03:20:25 +01:00
Laurent Monin
ab1a827282 Move upgrade message boxes to _upgrade_config() instead of MainWindow
Re-format messages so they wrap nicely.

Remove related FIXME
2014-01-01 12:54:51 +01:00