Raphael Pierzina
5b372aeee0
Remove blank lines in test_qflags_key
2015-04-03 18:55:24 +02:00
Raphael Pierzina
0b063ab4b4
Convert test_unknown
2015-04-03 18:51:40 +02:00
Raphael Pierzina
ff75d18e62
Convert test_int
2015-04-03 18:40:41 +02:00
Raphael Pierzina
086f12600c
Convert test_int_noklass
2015-04-03 18:37:12 +02:00
Raphael Pierzina
75e927f79e
Convert test_add_base
2015-04-03 18:33:22 +02:00
Raphael Pierzina
6482025399
Convert test_combined
2015-04-03 18:29:33 +02:00
Raphael Pierzina
f68cfc13e0
Convert test_multiple and use custom xfail marker
2015-04-03 18:25:28 +02:00
Raphael Pierzina
9a47848794
Create a new module and convert test_single
2015-04-03 18:22:13 +02:00
Raphael Pierzina
96a600e9dc
Change containing directory name to debug
2015-04-03 16:37:31 +02:00
Raphael Pierzina
b938318d5f
Remove former unittest class and skip test_reconverted
2015-04-03 16:34:42 +02:00
Raphael Pierzina
6b7ae70e6d
Convert test_unknown
2015-04-03 16:34:42 +02:00
Raphael Pierzina
1b476d9af7
Convert test_int
2015-04-03 16:34:42 +02:00
Raphael Pierzina
9e59108788
Convert test_int_noklass
2015-04-03 16:34:42 +02:00
Raphael Pierzina
df3096fbb5
Convert test_add_base
2015-04-03 16:34:42 +02:00
Raphael Pierzina
11ded52f06
Convert test_metaobj
2015-04-03 16:34:42 +02:00
Raphael Pierzina
d4d14598dd
Convert test_no_metaobj
2015-04-03 16:34:42 +02:00
Raphael Pierzina
64b1b48be6
Extract test_no_metaobj to separate module
2015-04-03 16:34:42 +02:00
Florian Bruhin
7e51addeb0
Fix :set-cmd-text with empty argument.
2015-04-03 14:42:19 +02:00
Florian Bruhin
4e0712622b
Clear search when :search without args is given.
...
Needed for #564 because :search "" won't work anymore.
2015-04-03 14:40:26 +02:00
Florian Bruhin
1dcc5a32d6
Correct keybindings to deprecated commands.
...
Needed for #564 (because of :search "").
Also see #525 .
2015-04-03 14:14:20 +02:00
Bruno Oliveira
298892a4a8
Converted test_standarddir to pytest
...
related to #10
2015-04-02 19:46:52 -03:00
Bruno Oliveira
751b62e344
Moving logging and QApplication to conftest
...
As discussed in #8
2015-04-02 19:09:06 -03:00
Florian Bruhin
18b5512fe9
Remove 'fooled' from state file.
2015-04-02 14:58:34 +02:00
Florian Bruhin
953119ef75
Revert "Minor QWebSettings fix."
...
Happy April's fools!
This reverts commit a98060e020
.
Conflicts:
qutebrowser/app.py
qutebrowser/misc/utilcmds.py
2015-04-02 14:56:42 +02:00
Bruno Oliveira
47b9ea1f88
Fixing docstring typo in test_progress
2015-04-02 08:05:23 -03:00
Florian Bruhin
84b9d34a7f
Fix lint.
2015-04-02 11:57:56 +02:00
Franz Fellner
3d3324ccfa
Add TabIndex label to the statusbar.
...
It shows the current tab index and the number of tabs of the windows it
sits in.
2015-04-02 11:55:42 +02:00
Florian Bruhin
9f9996bc66
Refuse to add empty URLs to history.
2015-04-02 09:09:17 +02:00
Florian Bruhin
214347497a
Fix handling of first :completion-item-prev call.
...
Before, the first item was unconditionally selected when none was selected
before. With :completion-item-prev (e.g. Shift-Tab), it makes more sense to
select the *last* one.
2015-04-02 07:41:56 +02:00
Florian Bruhin
37ab5296a7
Adjust URL completion when quickmarks are changed.
...
Fixes #590 .
2015-04-02 07:40:00 +02:00
Bruno Oliveira
79be5b0f4a
Implemented test for Progress widget
...
Also created a conftest file with a "default_config" fixture.
2015-04-01 22:39:25 -03:00
Bruno Oliveira
1f08d8e319
Implemented test for Percentage widget
2015-04-01 21:24:25 -03:00
Bruno Oliveira
3096f3856a
Implemented test for TextBase widget
2015-04-01 20:50:20 -03:00
Florian Bruhin
068e1c14b6
Don't display internal sessions in completion.
2015-04-01 22:32:41 +02:00
Florian Bruhin
1fb848249e
Handle sessions starting with _ as internal.
...
:session-{load,save,delete} now refuses to handle sessions starting with _,
unless a new -f/--force parameter is given.
2015-04-01 22:31:19 +02:00
Florian Bruhin
840652f396
Use sessions for :restart.
...
This saves a lot more state compared to just passing a list of pages.
2015-04-01 22:18:28 +02:00
Florian Bruhin
2ba28a59fe
Prevent session from being loaded with :restart.
2015-04-01 21:42:02 +02:00
Florian Bruhin
371ec564e1
Split restart() into :restart and _do_restart().
2015-04-01 21:38:18 +02:00
Florian Bruhin
11bd4a13f6
Serialize arguments via json on restart.
...
We want to ignore some positional arguments without ignoring flags/values - and
since there's no easy way to "unparse" an argparse namespace, we instead pass
it as json.
Also note we can't pass it as a file easily, as args have to be available very
early. Passing it as an argument shouldn't be an issue though.
2015-04-01 21:37:06 +02:00
Florian Bruhin
6e435ad215
Add state config sections when initializing.
2015-04-01 18:26:45 +02:00
Florian Bruhin
a98060e020
Minor QWebSettings fix.
...
If you're reading the diff, congrats. Please be quiet and don't spoil the fun
for others though! :)
2015-04-01 00:06:34 +02:00
Florian Bruhin
eeb875d098
Handle unavailable registry in on_focus_changed.
2015-04-01 00:02:29 +02:00
Florian Bruhin
431257d380
Fix handling of key release events.
...
Fixes #593 .
It seems Qt "re-uses" existing keyevents, so we have to save and compare the
data instead.
2015-03-31 23:09:40 +02:00
Florian Bruhin
8ebac8d38c
Various spelling fixes.
2015-03-31 21:11:47 +02:00
Florian Bruhin
eb3b0b960f
Use hunter for line tracing.
2015-03-31 20:38:46 +02:00
Florian Bruhin
2f629befc3
Add an option to disable host blocking.
2015-03-30 18:33:10 +02:00
Florian Bruhin
70ccdd86b2
Add zooming with Ctrl-mousewheel.
...
Closes #51 .
2015-03-30 15:26:07 +02:00
Florian Bruhin
a38c3ae1e1
Add a :tab-detach command.
...
See #62 .
2015-03-30 12:14:15 +02:00
Florian Bruhin
33dff70357
:session-load: Add a -c/--clear argument.
...
See #523 .
2015-03-30 07:13:13 +02:00
Florian Bruhin
dff8f73a11
:session-save: Show which session was saved.
...
This also adds a -q/--quiet argument to not print this.
See #523 .
2015-03-30 07:13:13 +02:00
Florian Bruhin
5233e7fac8
Fix UnboundLocalError on invalid quickmarks.
...
This also improves FuzzyUrlError messages.
2015-03-29 21:20:42 +02:00
Florian Bruhin
b2427701fa
Handle element webFrame being None when hinting.
2015-03-29 19:52:30 +02:00
Florian Bruhin
8af2e712ae
Add a --pdb-postmortem argument.
2015-03-29 19:45:00 +02:00
Florian Bruhin
d062ff5138
Fix starting with -c '' again.
...
Before c5a2039da4
(standarddir refactoring), we
only checked the commandline arguments for the config file, but not when
getting the quickmarks location (as the 'args' argument was None). This means
quickmarks were saved to the default config dir even with -c ''.
With that commit, this was "fixed" accidentally, but quickmarks couldn't handle
the filename being None.
2015-03-27 12:29:12 +01:00
Florian Bruhin
82322beb03
Fix pep257 issues.
2015-03-26 07:08:54 +01:00
Florian Bruhin
ec487dd6b1
Add some logging for javascript messages.
2015-03-24 11:35:58 +01:00
Florian Bruhin
5043f58f3c
Add an --override-restore argument.
...
See #523 .
2015-03-24 07:50:23 +01:00
Florian Bruhin
db98b03f34
Never open URL arguments in background.
2015-03-24 07:44:49 +01:00
Florian Bruhin
1d1ac1ef6f
Save session to load in state file.
...
Before, we always loaded the default session (if it existed) and then deleted
it. This was surprising as the default session was deleted even when another
session was loaded.
Now we don't delete it at all, and save the session to load in the state file.
See #523 .
2015-03-24 07:12:35 +01:00
Florian Bruhin
1425d306bc
Fix lint.
2015-03-23 08:19:31 +01:00
Florian Bruhin
0e8b42a9d8
Add a --relaxed-config options.
2015-03-23 07:58:28 +01:00
Florian Bruhin
e7f5433da3
Enable python warnings earlier and unconditionally.
2015-03-23 07:40:22 +01:00
Florian Bruhin
21d2bb2291
Simplify some unneeded lambdas.
2015-03-23 07:04:50 +01:00
Florian Bruhin
8811947f50
Re-enable some pylint checks.
2015-03-23 07:04:41 +01:00
Florian Bruhin
97b678d8c7
Don't display time deltas < 1s in messages.
2015-03-22 23:50:12 +01:00
Florian Bruhin
c13e09b706
Add option to queue all msgs in unfocused windows.
2015-03-22 23:47:16 +01:00
Florian Bruhin
157c25bb13
Queue messages for 'current' window if unfocused.
...
Fixes #512 .
2015-03-22 22:39:56 +01:00
Florian Bruhin
19d369377e
Update references to HACKING/CONTRIBUTING.
2015-03-20 12:18:15 +01:00
Florian Bruhin
565303ebcd
Fix hinting when page has no URL set yet.
2015-03-20 08:35:33 +01:00
Florian Bruhin
858c38964b
Release v0.1.4
2015-03-20 08:30:02 +01:00
Florian Bruhin
f77c0f9afa
Simplify package output in earlyinit.py.
...
It doesn't really help much to have package names for distributions in there,
and it's way too much effort. Closes #475 .
2015-03-20 07:16:47 +01:00
Florian Bruhin
adb11360db
Disallow tab=None with objreg.get(scope='tab').
...
This would've made it a lot easier to detect #563 .
2015-03-19 22:28:24 +01:00
Florian Bruhin
7a4a4a4a4e
Pass tab_id correctly with scope='tab' commands.
...
Fixes #563 .
2015-03-19 22:19:25 +01:00
Florian Bruhin
218822d6e8
Clear rejected SSL questions when reloading page.
...
Fixes #565 .
2015-03-19 21:21:40 +01:00
Florian Bruhin
d6732c64a3
Revert "Handle NavigationTypeOther acceptNavigationRequest"
...
This reverts commit 4b4bb3af88
.
Fixes #567 . #488 is still okay because of
f3b55d68db05247b5c3f5dc576dadb0aa1848ca3.
2015-03-19 19:06:58 +01:00
Florian Bruhin
fb5fbd09da
Handle unencodable file paths in config types.
...
If an user e.g. has a download-directory of ~/föö, but has LC_ALL=C set, we'll
get an UnicodeEncodeError when trying to validate it. This is now handled
properly by raising a ValidationError.
Fixes #562 .
2015-03-19 12:42:35 +01:00
Florian Bruhin
c83775cf29
Update icon db path when private-browsing changed.
2015-03-18 20:20:04 +01:00
Florian Bruhin
706cc1a87f
Merge branch 'master' of https://github.com/sbinix/qutebrowser into sbinix-master
...
Conflicts:
qutebrowser/config/websettings.py
2015-03-18 20:16:36 +01:00
Florian Bruhin
ca22ed02e6
Fix via_ipc typo.
2015-03-17 19:13:44 +01:00
Florian Bruhin
2b10adfad7
Remove colors -> completion.item.bg config option.
...
This wasn't used anywhere...
2015-03-17 07:45:11 +01:00
Florian Bruhin
2dcf323077
Add missing docstrings.
2015-03-17 06:39:02 +01:00
Florian Bruhin
94bc10405a
Merge branch 'histcomplete'
2015-03-17 06:16:26 +01:00
Florian Bruhin
9a405df560
Whoops.
2015-03-16 23:32:49 +01:00
Florian Bruhin
210ce8ca7c
Don't poll for signals on Unix.
...
A better solution is to use QSocketNotifier and os.wakeup_fd to get notified
about new signals.
Thanks to Yuya Nishihara / TortoiseHG for the hint!
Fixes #555 .
2015-03-16 23:25:36 +01:00
Florian Bruhin
6dc65287a9
Discard uninteresting events early in eventFilter.
...
Before, we ran quite a lot of code (e.g. objreg) on every event, even if it
turns out to not be a keypress/release event at all.
2015-03-16 23:25:29 +01:00
Florian Bruhin
f1b9a3c8b5
Ensure there's no size for font-family settings.
...
See #549 .
2015-03-16 18:32:17 +01:00
Florian Bruhin
4157cfe86f
Merge branch 'issue549-fix'
2015-03-16 18:03:00 +01:00
Florian Bruhin
b1f99392e8
Add some more logging for #549 .
2015-03-16 18:01:02 +01:00
Florian Bruhin
1aaa538b45
Ignore empty lines in history.
2015-03-16 10:45:50 +01:00
Florian Bruhin
59bbca9b40
Fix updating of existing items in hist-completion.
...
Before we limited the history items we could simply call WebHistory's
historyContains before iterating through all items in the history completion.
Now however it's possible an item is in the real WebHistory, but not actually
in the completion - so we always have to check the whole completion.
2015-03-16 09:20:09 +01:00
Florian Bruhin
777e3f58e1
Make network inaccessible in test QWebPages.
...
Maybe fixes #553 .
2015-03-16 08:32:17 +01:00
Florian Bruhin
806742abd3
Move new entries to the end when loading history.
...
Before, if an URL was present early in the history and then again later, we
didn't move it to the end of the OrderedDict. This means it won't be loaded in
the completion.
2015-03-16 07:54:39 +01:00
Florian Bruhin
3df5e13c65
Fix exception in filtermodel if model has no items.
2015-03-16 07:42:21 +01:00
Florian Bruhin
503060881a
Compare history items based on QUrl.
2015-03-16 07:42:10 +01:00
Florian Bruhin
693ea0c312
Cleanup
2015-03-16 07:10:06 +01:00
Florian Bruhin
553d8cf986
Also save the QUrl in a HistoryEntry.
...
We also use QUrl::toDisplayString for the completion so things like spaces or
umlauts are decoded properly.
2015-03-16 07:03:30 +01:00
Florian Bruhin
46c31911a6
Add a test for utils.debug.log_time.
2015-03-16 06:43:56 +01:00
Florian Bruhin
001bf982e5
Alternate row colors in completion.
2015-03-15 23:16:57 +01:00
Florian Bruhin
d266665955
Fix adding of URLs to history completion.
...
Before, the item_added signal was emitted *after* an item was added, which
means the on_history_item_added slot always assumed the item already is in the
history.
2015-03-15 21:16:45 +01:00
Florian Bruhin
9512a52d21
completion: Don't unnecessarily expand all items.
...
Instead of calling expandAll() and iterating through all items, we can just
force the top-level items to be expanded.
2015-03-14 22:51:53 +01:00
Florian Bruhin
cdbb118238
Also measure the time it takes to set the pattern.
2015-03-14 13:35:32 +01:00
Florian Bruhin
70cd8e74eb
Measure time it takes to init URL completion.
2015-03-14 13:32:47 +01:00
Florian Bruhin
833830d5e9
Limit the count of history items in the completion.
2015-03-13 19:50:08 +01:00
Florian Bruhin
55eabafc0d
Rename completion -> history-length.
...
This is now renamed to cmd-history-max-items to avoid confusion with the web
history.
2015-03-13 19:46:21 +01:00
Florian Bruhin
901db0911e
Add __len__ to WebHistory.
2015-03-13 19:45:43 +01:00
Florian Bruhin
994546f04d
Use an OrderedDict for WebHistory.
...
We need the URLs in the correct order to get the newest items anyways.
2015-03-13 19:44:15 +01:00
Florian Bruhin
94f694bd77
Add an utils.newest_slice.
...
This takes an iterable and uses itertools.islice to get the n newest elements
from it.
2015-03-13 19:25:48 +01:00
Florian Bruhin
96da7d9fe6
Fix lint.
2015-03-13 16:26:27 +01:00
Florian Bruhin
74892ac8e4
Initialize completions lazily and only once.
...
Before, we initialized the completions once for every window spawned, which was
a waste of CPU-time and RAM.
Now we only initialize them once, when the user uses the completion for the
first time.
2015-03-13 16:25:13 +01:00
Florian Bruhin
cef49864d9
Refactor websettings and save/restore defaults.
...
This makes qutebrowser.config.websettings much easier to understand, and saves
all defaults so it can restore them properly when a setting is set to an empty
string.
Before, when we set the fonts to empty strings instead of the true default, in
some cases anti-aliasing was broken.
Fixes #549 .
2015-03-13 10:03:17 +01:00
Florian Bruhin
ccce2eddad
Add logging for websettings init.
...
See #549 .
2015-03-12 22:41:12 +01:00
Florian Bruhin
389feab1df
Make sure args are not int in new_item().
...
Otherwise we would construct a QStandardItem with the
QStandardItem(int rows, int columns = 1) constructor, which will most likely
not do what we want.
2015-03-12 15:35:53 +01:00
Florian Bruhin
dbd121a079
Set data of existing item.
2015-03-12 15:34:32 +01:00
Florian Bruhin
97dd86735a
Improve types of history model values.
...
- HistoryItem.atime now always should be an int/float.
- The data for the sort role should also be an int, not a string.
A float would also work, but maybe be slower for no real benefit.
2015-03-12 15:34:32 +01:00
Florian Bruhin
8023b1456d
Make it possible to configure the timestamp format.
2015-03-12 15:25:39 +01:00
Florian Bruhin
7a28b6c821
Fix lint.
2015-03-12 14:55:54 +01:00
Florian Bruhin
299dbfa56a
history: Remove unneeded _old_hit and _old_miss.
...
The need for those were removed in #548 .
2015-03-12 14:46:49 +01:00
Jimmy
61e732f217
history: simplify
2015-03-12 21:35:56 +13:00
Jimmy
1efe18ecc6
Prevent duplicates in history completion.
...
Two things here. One is to use `WebHistory._new_history` only as a to-save
queue, so we now add entries to `_old_urls` when they are first created and
can now no longer iterate of `_new_history` in `__iter__()`.
Second is to stop blindly tacking new history entries on the end of the
history completion model. It does involve iterating over the model to find the
existing entry but we only do that if we know the duplicate is there, which is
fast to check.
This also ads another point of mutation to the history completion model which
may prove problematic if it leads to more segfaults.
2015-03-12 20:15:03 +13:00
Jimmy
734268187c
Clean up incomprehensible comment.
2015-03-12 20:12:59 +13:00
Florian Bruhin
9ee19be70d
Convert the atime to float in HistoryEntry.
2015-03-12 08:07:40 +01:00
Florian Bruhin
0b975db4dd
Refactor how completions are organized.
2015-03-11 23:07:58 +01:00
Florian Bruhin
34b24aafa8
Fix lint
2015-03-11 22:22:49 +01:00
Florian Bruhin
fe4f32606d
Use CompletionFilterModel's sort implementation.
2015-03-11 21:50:16 +01:00
Jimmy
834832e3ba
Web history changed signal now emits the new entry.
...
Each new HistoryEntry is emitted after being added to the global history
store. Current members of the HistoryEntry are `url` and `atime`. `title`
should be coming soon.
2015-03-11 21:50:16 +01:00
Jimmy
59948a038c
Add new UrlCompletion model which includes web history and quickmarks.
...
I went to some effort to avoid duplipcating code which which leads to some
arguably ugly class method calling.
2015-03-11 21:50:16 +01:00
Jimmy
f6a7ef3985
Add url history completion for open.
...
Adds a basic completion model implementation around the global browser
history and registers that for the open command.
Modifies WebHistory to add an __iter__ method and to use a dict instead of a
set to store an entire HistoryEntry for each archived item instead of just the
URL. Brief tests showed that the lookup time for set and dict are very
similar. They are at least on the same order of magnitude. Testing membership
of a list on the other hand, as was the case before a set was used, was four
orders of magnitude slower on my machine.
2015-03-11 21:50:16 +01:00
Florian Bruhin
fb85a279f4
Merge branch 'master' of https://github.com/error800/qutebrowser into error800-master
2015-03-11 21:49:27 +01:00
Florian Bruhin
e8e6d8409b
Adjust pylint exceptions.
2015-03-11 20:14:39 +01:00
Florian Bruhin
12a82eb371
Add an unittest for foo::bar URLs.
...
See #544 , #546 .
2015-03-11 17:48:24 +01:00
Patric Schmitz
4fa64350ca
Handle URLs with double-colon at the beginning as search strings
...
Closes #544 . We might also merge #542 now.
2015-03-11 17:35:32 +01:00
error800
94666fe979
Removed default search engines. Closes #533 .
2015-03-11 11:25:50 +01:00
Florian Bruhin
0f5391c4fa
Scroll completion to top when showing it.
...
See #531 .
2015-03-11 07:50:51 +01:00
Florian Bruhin
1b879faf84
completion: Highlight text case-insensitively.
...
See #531 .
2015-03-11 07:50:45 +01:00
Florian Bruhin
5b4f6d39c2
Add a dumb sorting option to CompletionFilterModel.
...
This makes it possible to use Qt's QSortFilterProxyModel::lessThan option for
completions where it doesn't make sense to priorize matches starting with the
entered string, e.g. for URLs. In return, we get a *much* better performance
(several seconds when opening the completion).
See #531 .
2015-03-11 07:50:33 +01:00
Florian Bruhin
1ead66a4d5
quickmarks: Ignore empty and whitespace-only lines.
2015-03-10 23:25:02 +01:00
Florian Bruhin
acc33b4f91
Add a -f/--force argument to :bind.
2015-03-10 22:32:11 +01:00
Florian Bruhin
aca44da26e
Force saving with :save even w/o auto-save-config.
2015-03-10 22:24:34 +01:00
Florian Bruhin
596bff0772
Don't try to add tab repr in TabDeletedError.
...
This will always fail with another RuntimeError...
2015-03-10 22:16:41 +01:00
Florian Bruhin
d87a1bb2b4
Add a hints -> scatter option.
...
This is enabled by default to keep the same default behaviour which is like
Vimium - mixing e.g. single-char letters and double-char letters, and
scattering/shuffling the labels to have an uniform hint key distribution.
If disabled, the behaviour is more similiar to dwb, which has a fixed hint
string length and simply fills the string starting with the first possible hint
char.
2015-03-10 21:19:47 +01:00
Florian Bruhin
2f0522ebb0
Add a --rapid option to :hint, remove rapid target
...
This makes it possible to use rapid hinting for the run/hover/userscript/spawn
targets as well, and makes more sense anyways.
2015-03-10 19:40:30 +01:00
Florian Bruhin
4b6d49e926
Make QSslError hashable for Qt <= 5.4.
...
PyQt uses qHash() for __hash__, and qHash for QSslError was added with Qt 5.4.
This means 2da45e98ca
raised TypeError there as
QSslError is unhashable.
For those older Qt versions, we implement __hash__ ourselves which does about
the same thing as Qt does, combining the DER (binary) representation of the
certificate and the error() (which is just a QEnum, hashable as int).
2015-03-10 08:29:56 +01:00
Florian Bruhin
2da45e98ca
Auto-handle equal SSL errors for the same host.
...
For every (scheme, host, port) tuple, we save all SSL errors we asked the user
about, and if everything matches (scheme, host, port, error, certificate), we
don't ask the user again.
Fixes #422 .
2015-03-10 07:58:40 +01:00
Florian Bruhin
8307b546b7
Adjust prompt size hint based on content.
...
See #26 .
Fixes #506 .
Related to 06cc982ab5
.
2015-03-09 19:35:50 +01:00
Florian Bruhin
9ffb30a16f
Ignore RuntimeError in mouserelease_insertmode.
...
It seems when clicking certain elements, the webview can get deleted before the
singleShot QTimer will activate.
2015-03-09 11:49:01 +01:00
Florian Bruhin
e78fa431c5
Hide Qt warning when aborting download reply.
2015-03-09 07:49:02 +01:00
Florian Bruhin
6a16875f50
Fix retrying of downloads from closed tabs.
...
Fixes #502 .
2015-03-09 07:39:40 +01:00
Florian Bruhin
bfc114ae35
Fix lint
2015-03-08 23:15:35 +01:00
Florian Bruhin
181bcc4f8d
Add tests for lineparser.
2015-03-08 22:13:29 +01:00
Florian Bruhin
60b6519b04
lineparser: Call _prepare_save() properly.
2015-03-08 21:53:42 +01:00
Florian Bruhin
181426b50a
AppendLineParser: Strip newlines in __iter__.
2015-03-08 21:53:42 +01:00
Florian Bruhin
2010e8115b
lineparser: Rename _open_for_reading to _open.
2015-03-08 21:53:42 +01:00
Florian Bruhin
27f4ada799
Add AppendLineParser and use it in WebHistory.
...
The former approach (always reading the whole history from disk) was rather
inefficient, and we had performance problems e.g. when marking text in Qt
documentation.
2015-03-08 21:53:42 +01:00
Florian Bruhin
5b4b793538
Split LineParser into multiple classes.
...
There is now:
- BaseLineParser
- LineParser
- LimitLineParser
2015-03-08 21:53:42 +01:00
Florian Bruhin
99de995813
Rename/move config.parsers.line.LineConfigParser.
...
It's now misc.lineparser.LineParser since it handles other stuff than just
config.
2015-03-08 21:53:42 +01:00
Florian Bruhin
ee8beb174d
Fix :tab-clone -w (i.e. back -w). Fixes #536 .
2015-03-08 15:02:18 +01:00
Florian Bruhin
cd34562d34
Fix :tab-clone with tabs -> tabs-are-windows=true.
...
See #536 .
2015-03-08 14:54:42 +01:00
Florian Bruhin
f7b036cf15
Merge branch 'oed-download_filename_handling'
2015-03-06 17:06:01 +01:00
Florian Bruhin
edf762e210
Avoid pylint duplicate-code warning.
2015-03-06 17:04:56 +01:00
Florian Bruhin
858131c9bc
Merge branch 'download_filename_handling' of https://github.com/oed/qutebrowser into oed-download_filename_handling
2015-03-06 16:39:44 +01:00
Florian Bruhin
0827ddec86
utils.log: Simplify stack printing on Qt warnings.
2015-03-06 16:33:22 +01:00
Florian Bruhin
3e5b9a4a4a
log.utils: Add Qt warning filter context manager.
2015-03-06 16:32:26 +01:00
Florian Bruhin
2c9b5f24fc
Use _shutting_down instead of disconnecting signal
...
This will most likely cause less pain than disconnecting the signal, which
seems to be broken on OS X.
2015-03-06 16:29:04 +01:00
Florian Bruhin
034f1136d3
Add missing qutebrowser.test.log module.
2015-03-06 16:28:30 +01:00
Joel Torstensson
0fb74da4ff
Can now handle relative paths.
2015-03-05 23:44:12 +01:00
Florian Bruhin
7ed8f3d4ac
unittests: Set up logging properly.
2015-03-05 23:41:46 +01:00
Florian Bruhin
7c125642b9
Hide "Error while shutting down tabs" message.
...
This makes no sense at all, yet seems to happen when closing qutebrowser on OS
X via Cmd+Q.
2015-03-05 21:46:56 +01:00
Joel Torstensson
d449a60078
Fixed bug using download dirs with trailing slash.
2015-03-05 20:33:02 +01:00
Joel Torstensson
9cfa34c009
Readded suggested_filename fallback.
2015-03-05 20:17:48 +01:00
Florian Bruhin
61a52f3b91
command: Check the completion/argument counts.
...
See #531 .
2015-03-05 06:20:55 +01:00
Joel Torstensson
7d48845afa
Made static functions private.
2015-03-04 23:05:23 +01:00
Florian Bruhin
ebae77e8c5
Fix lint.
2015-03-04 20:52:33 +01:00
Florian Bruhin
e5ebea80b3
Add qApp.quit atexit handler in tests.
...
This FINALLY fixes the test segfaults on Windows 8.
2015-03-04 20:48:58 +01:00
Florian Bruhin
be6ea2f0e8
Call QApplication.processEvents on exit.
2015-03-04 20:26:19 +01:00
Florian Bruhin
e431f09fab
test_editor: Fix handling of statusbar messages.
2015-03-04 20:25:57 +01:00
Joel Torstensson
4e7e97232e
Downloads using get_request specifying only path now works.
2015-03-04 12:24:26 +01:00
Joel Torstensson
49c666a4a8
get_request is now correct.
2015-03-04 12:06:08 +01:00
Joel Torstensson
68774a2c75
Style fixes.
2015-03-04 11:31:54 +01:00
Joel Torstensson
8e0c1cff7b
Made download suggestion configurable.
...
Fix #505
2015-03-04 11:31:54 +01:00
Joel Torstensson
82deaeed2e
Downloads now shows path in question.
2015-03-04 11:29:36 +01:00
Florian Bruhin
40af99bacc
Clear open target in acceptNavigationRequest.
...
This is a regression introduced in a76868c0f4
.
Fixes #530 .
2015-03-03 23:28:45 +01:00
Florian Bruhin
801f6b2667
Fix handling of signals with deleted tabs.
2015-03-03 23:22:29 +01:00
Gregor Pohl
c8c095d499
Add Opera-like mouse rocker gestures.
2015-03-03 12:58:32 +01:00
Florian Bruhin
f19eba3b40
Don't log cur_link_hovered signals.
2015-03-03 09:07:30 +01:00
Florian Bruhin
21ab5f8685
Add logging for acceptNavigationRequest.
2015-03-03 09:06:43 +01:00
Florian Bruhin
65f21fc8ee
Use unittest.mock.patch for tests. Closes #76 .
2015-03-01 22:10:16 +01:00
Florian Bruhin
c0eb8daff7
Add tests for keyinput->partial-timeout.
2015-03-01 21:35:14 +01:00
Florian Bruhin
003f7fd957
tests: Improve FakeTimer.
2015-03-01 21:30:22 +01:00
Florian Bruhin
bb2caaa11d
Suppress Qt warning in unittests.
2015-03-01 21:30:22 +01:00
Florian Bruhin
84643b4a39
Various unittest fixes and improvements.
2015-02-27 12:43:54 +01:00
Florian Bruhin
072210c47b
Log rfc6266 UnicodeDecodeError to correct logger.
2015-02-27 12:35:46 +01:00
Florian Bruhin
e696898c4a
Add input -> partial-timeout option to clear partial keystrings.
2015-02-27 10:59:03 +01:00
Florian Bruhin
42e2438efb
Return Match instead bool in _handle_single_key.
2015-02-27 10:59:03 +01:00
Florian Bruhin
d66997610b
Use a single Timer for ambigious keybindings.
2015-02-27 10:59:03 +01:00
Florian Bruhin
bfd0a3fbc2
Fix AttributeError when doing extended hinting.
2015-02-27 08:44:44 +01:00
Florian Bruhin
561ebd07f9
Make it possible to use :open -[twb] without url.
2015-02-27 08:10:00 +01:00
Florian Bruhin
5f46870594
Add a FuzzyUrl config type.
2015-02-27 08:08:46 +01:00
Florian Bruhin
6d51fcfb2e
Add a do_search argument to fuzzy_url.
...
This turns off searching no matter what autosearch is set to, and also makes it
possible to use fuzzy_url before the config is up.
For now, we use this for quickmarks and the startpage.
2015-02-27 08:07:40 +01:00
Florian Bruhin
a76868c0f4
Refactor how click/hint open targets are handled.
2015-02-26 20:41:04 +01:00
Florian Bruhin
fa0bfaa49e
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-26 20:21:00 +01:00
Florian Bruhin
eb8bad3d18
Reset open_target in acceptNavigationRequest.
...
After ddb39275eb
, when something was opened via
hints in a new tab, the open_target still was set afterwards and the next
regular open did open in a new tab.
2015-02-26 20:17:01 +01:00
Florian Bruhin
a12dee8898
hints: Include button in buttons().
...
From the QMouseEvent::buttons documentation:
For mouse move events, this is all buttons that are pressed down. For mouse
press and double click events this includes the button that caused the
event. For mouse release events this excludes the button that caused the
event.
2015-02-26 20:12:48 +01:00
Florian Bruhin
ddb39275eb
Simulate Ctrl-click when hinting in new tab/win.
...
This works around the fact some pages (e.g. github) load their content via AJAX
on a normal left click, so we'll never get acceptNavigationRequest and thus
can't open them in a new tab.
Fixes #488 .
2015-02-26 20:11:13 +01:00
Florian Bruhin
4b4bb3af88
Handle NavigationTypeOther acceptNavigationRequest
...
This fixes hinting in some cases where javascript is used to load content, e.g.
on duckduckgo. However it still doesn't seem to help with github files etc.
See #488 .
2015-02-26 20:04:00 +01:00
Florian Bruhin
0ebef4069e
Remove debug console completing completely.
...
Turns out pylint doesn't like it if stuff is unused because we commented code
out ;)
2015-02-26 17:56:45 +01:00
Florian Bruhin
813ce9a513
Disable completion for debug console.
...
As long as it's broken it's more annoying rather than useful.
See #117 .
2015-02-26 17:48:47 +01:00
Florian Bruhin
8e0dddf86a
Restore sys.std* in utils.fake_io on exceptions.
2015-02-26 17:47:07 +01:00
Florian Bruhin
fcbd69e209
Clean up standarddir handling #2 .
...
We already attempted this in c5a2039da4
, but
having the directories as module attributes means they'll be created on start
(rather than when they're actually used), and it'd also be impossible to change
them after init for some reason in the future.
To still have a nice short API, we simply change the attributes to functions.
2015-02-26 07:01:22 +01:00
Florian Bruhin
0d9bf5e2c9
Fix lint.
2015-02-26 06:13:27 +01:00
Samir Benmendil
81af41d77f
Add option to set minimum number of chars in hints
2015-02-26 00:49:50 +00:00
Florian Bruhin
1dc9862c0b
Allow font names with integers in them.
2015-02-25 23:20:09 +01:00
Florian Bruhin
1d27dcca81
Ignore RuntimeError because of deleted Question.
2015-02-25 23:12:23 +01:00
Florian Bruhin
31d9018fc4
Disable insecure SSL ciphers (< 128bit) for Qt 5.2.
...
This is only an issue for the users which are stuck on Ubuntu Trusty.
2015-02-25 21:07:44 +01:00
Florian Bruhin
0fcd016427
Move cursor to end of textboxes when hinting.
2015-02-25 19:56:03 +01:00
Florian Bruhin
9d716d74b4
Fix lint.
2015-02-25 18:01:30 +01:00
Florian Bruhin
891c07f7e3
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-25 17:27:01 +01:00
Florian Bruhin
caad56c978
Print stacktrace on Qt warnings.
2015-02-24 07:12:25 +01:00
Florian Bruhin
0f9a1fe178
Display ImportError messages in earlyinit errors.
2015-02-23 15:16:30 +01:00
Florian Bruhin
94434ea739
Decorate DownloadItem slots with @pyqtSlot.
...
Before, using the right-click menu to cancel the download didn't actually
cancel it, as the QAction.toggled signal was emitted with checked=False which
got interpreted as remove_data=False.
2015-02-23 10:01:37 +01:00
Florian Bruhin
c5a2039da4
Refactor QStandardPaths handling.
2015-02-22 19:13:51 +01:00
Florian Bruhin
cabe5bf2a3
Use the real argparser instance for qtutils tests.
2015-02-22 12:10:42 +01:00
Florian Bruhin
617cd8977b
Add --qt-name argument. See #514 .
2015-02-21 18:53:01 +01:00
Florian Bruhin
359482b511
Fix getting Qt arguments.
2015-02-21 18:52:14 +01:00
Florian Bruhin
0ccb104f48
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-20 17:35:31 +01:00
Florian Bruhin
05d8a2429b
tests: Fix double tearDown.
2015-02-20 09:27:41 +01:00
Florian Bruhin
42c8acc7aa
Fix lint
2015-02-20 09:23:06 +01:00
Florian Bruhin
f33bc7bf31
tests: Get rid of second QCoreApplication.
2015-02-20 09:21:59 +01:00
Florian Bruhin
684f0d3df5
Fix starting with -c '' again.
2015-02-20 09:12:56 +01:00
Florian Bruhin
5fe85d0dde
Add test for starting with -c ''.
2015-02-20 09:09:35 +01:00
Florian Bruhin
60d4305cc4
tests: Adjust environ_set_temp to take a dict.
2015-02-20 08:34:24 +01:00
Florian Bruhin
634028e277
Fix QIODevice warnings when closing tabs.
...
This is a regression introduced in 43c9d69295
.
Fixes #517 .
2015-02-20 07:43:40 +01:00
Florian Bruhin
14f2420500
Fix wrong parsing of faulthandler logs.
2015-02-19 22:45:37 +01:00
Florian Bruhin
a41331a402
Remove test QApplication "fix" again.
...
This causes more segfaults than it prevents...
2015-02-19 22:41:36 +01:00
Florian Bruhin
87951ee3a8
Fix crash when closing tabs on Qt 5.2.1 (Trusty)
...
This issue was introduced in 8f1d81a644
.
2015-02-19 22:20:39 +01:00
Florian Bruhin
b5d3b264e8
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-19 21:38:11 +01:00
Florian Bruhin
2d4b03fbc9
Improve parsing of faulthandler logs.
2015-02-19 21:38:02 +01:00
Florian Bruhin
81fb57bbf0
Revert "Try another workaround for broken Windows tests."
...
This reverts commit 852fe2f84c
.
2015-02-19 16:59:33 +01:00
Florian Bruhin
852fe2f84c
Try another workaround for broken Windows tests.
2015-02-19 10:41:04 +01:00
Florian Bruhin
7dd908bd51
Try calling sip.delete on the test QApplication.
...
Maybe this helps with the unit tests on Windows?
2015-02-19 10:03:19 +01:00
Florian Bruhin
543c6cb90b
Quit test QApplication properly.
...
Maybe this fixes the hangs and crashes on the Windows buildbots?
2015-02-19 07:46:08 +01:00
Florian Bruhin
3d5012ccca
Rename 'Allowed' header for value completions.
2015-02-19 07:10:40 +01:00
Florian Bruhin
dc9e2a9772
Add a list of common user agents to completion.
2015-02-19 07:09:34 +01:00
Florian Bruhin
8c32fb86e2
Make it possible to set options with ! in it.
...
This is needed for a quit! alias for example. The option was wrongly treated as
an inversion even though a value was given.
2015-02-18 23:06:35 +01:00
Florian Bruhin
ea2dba6b38
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-18 22:20:41 +01:00
Florian Bruhin
3d72235023
Set the QSettings path to a config-subdirectory.
...
QWebInspector uses QSettings to save its GUI-settings. However, the default
path for QSettings is ~/.config/qutebrowser/qutebrowser.conf which overwrites
our own config file.
This fixes one part of #515 .
2015-02-18 22:18:55 +01:00
Florian Bruhin
9534deb2e7
Add a context manager to unset organizationName.
2015-02-18 22:18:55 +01:00
Samir Benmendil
0ec05e071f
expand environment vars in settings accepting paths
2015-02-18 15:04:49 +00:00
Florian Bruhin
7a90d7fca8
Fix standarddir tests when XDG_*_HOME is set.
2015-02-18 13:47:15 +01:00
Florian Bruhin
83b636a0a7
Add some more tabhistory test URLs.
2015-02-18 07:10:46 +01:00
Florian Bruhin
62fb4b0d0b
Fix initial creating of config.
2015-02-17 22:43:32 +01:00