Commit Graph

1115 Commits

Author SHA1 Message Date
Florian Bruhin
ab099ea6ea Fix another spelling mistake. 2015-10-14 07:02:50 +02:00
Florian Bruhin
7ff881c3e3 Merge branch 'incdec-setting' of https://github.com/Kingdread/qutebrowser into Kingdread-incdec-setting 2015-10-04 17:04:40 +02:00
Florian Bruhin
d229e90724 Fix some splelling mistakes. 2015-10-04 15:41:42 +02:00
Daniel
1bdb012b2c Add a config option for navigate_incdec
Also known as Ctrl-A/Ctrl-X. You can now specify which parts of the URL
should be searched for numbers.

The setting is general->url-incdec-segments and it's a set with valid
values of 'host', 'path', 'query' and 'anchor'.
2015-09-30 19:18:00 +02:00
neeasade
2e62d24062 Empty osver for linux, adjust test to match this. 2015-09-29 13:59:22 -05:00
neeasade
b5ec476ca6 Fixes #977 with none deprecated call. 2015-09-29 12:56:49 -05:00
meles5
d7dd1b3507 Windows support useless 2015-09-25 18:39:15 +02:00
meles5
fc7488645f The resource_url() function should now support Windows 2015-09-25 18:21:04 +02:00
meles5
70597d574f Added resource_url() function and used this function in the error page 2015-09-25 14:31:04 +02:00
Florian Bruhin
7f573616c8 Remove unused import. 2015-09-16 23:01:14 +02:00
Florian Bruhin
0745de647b Allow debug.log_time to be used as decorator. 2015-09-16 22:50:19 +02:00
Florian Bruhin
545d82a04d utils.debug: Allow passing logger to log_time. 2015-09-16 22:38:31 +02:00
Florian Bruhin
0bbd410016 standarddir: Fix coverage. 2015-09-15 22:31:37 +02:00
Florian Bruhin
cc052a539f Add standarddir.download() tests. 2015-09-15 22:31:37 +02:00
Florian Bruhin
04ec9c2624 Get rid of standarddir.temp() again. 2015-09-15 22:31:37 +02:00
Florian Bruhin
3bdfa3001c ipc: Always use standarddir.runtime(). 2015-09-15 22:31:37 +02:00
Florian Bruhin
748496e88d Refactor standarddir.
See #941.
2015-09-15 22:31:37 +02:00
Florian Bruhin
09b0877eab Revert "Refactor standarddir."
This reverts commit 330f3f8f13.
2015-09-11 21:20:31 +02:00
Florian Bruhin
330f3f8f13 Refactor standarddir.
See #941.
2015-09-11 20:05:13 +02:00
Florian Bruhin
5fe420efb5 standarddir: Fix TOCTOU issue when creating paths.
Fixes #942.
2015-09-11 18:21:20 +02:00
Florian Bruhin
1311e99e7c Make pep8 shut up. 2015-09-09 23:00:52 +02:00
Florian Bruhin
bcee12853d Cleanup for ignored log messages. 2015-09-09 22:53:37 +02:00
Florian Bruhin
d217fe09c6 Hide some more lgo messages on OS X.
Fixes #931.
2015-09-09 22:50:43 +02:00
Florian Bruhin
69e735c42e ipc: Add username to hash instead. 2015-09-09 19:31:52 +02:00
Florian Bruhin
78cb0eaf85 More work on #888 (new IPC path).
First trying the legacy path and then using the new one works fine now, but the
permissions are still wrong.
2015-09-09 19:31:52 +02:00
Florian Bruhin
a4bc4ad478 Only log a single message in utils.error.
This helps with seeing the full message with logfail.
2015-09-09 19:31:52 +02:00
Florian Bruhin
9d9372c6a8 Add standarddir.temp(). 2015-09-09 19:31:52 +02:00
Florian Bruhin
cc80cfdfd6 Add missing return. 2015-09-06 17:15:13 +02:00
Florian Bruhin
9521da3c73 Fix error output with --no-err-windows. 2015-09-04 08:04:18 +02:00
Alexander Cogneau
26058f4e80 A few cmdhistory tests 2015-08-25 18:46:49 +02:00
Antoni Boucher
77190554cc Merge branch 'master' into feature/directory-browser 2015-08-12 16:57:45 -04:00
Florian Bruhin
2d8aaecd65 100% coverage for utils.debug. 2015-08-11 17:11:00 +02:00
Florian Bruhin
64a1cad604 Clean up output for get_all_objects(). 2015-08-11 17:10:41 +02:00
Florian Bruhin
a3a7f8936b Allow to pass a root object to _get_pyqt_objects. 2015-08-11 17:10:02 +02:00
Florian Bruhin
307bbde6e0 Fix utils.debug.get_all_children(). 2015-08-11 17:09:20 +02:00
Florian Bruhin
0ca96740c9 Make utils.debug.format_args public. 2015-08-11 17:08:49 +02:00
Florian Bruhin
caedb57e56 Fix staticMetaObject handling in qenum_key.
Since we checked on klass instead of base, there never was a staticMetaObject
and the slower path was always taken - this corrects that.
2015-08-11 17:07:47 +02:00
Florian Bruhin
10298e9692 Don't connect destroyed signal in log_signals.
This causes weird segfaults and is probably not that important to log.

Fixes #867.
2015-08-11 14:29:06 +02:00
Florian Bruhin
fe3eb30892 Reorganize exceptions in urlutils.
- Instead of ValueError, a new InvalidUrlError is raised with invalid URLs.
- FuzzyUrlError got removed as it's basically the same as InvalidUrlError.
2015-08-09 18:48:32 +02:00
Antoni Boucher
b8809f879d Added resource_filename function and tests. 2015-08-08 13:47:47 -04:00
Daniel
9e98ab181a Add URL validity check + tests to incdec_number 2015-08-08 00:57:16 +02:00
Daniel
c4c3a83ac0 rename url_incdec_number to incdec_number 2015-08-08 00:57:16 +02:00
Daniel
276b163e0d Move logic from _navigate_incdec to urlutils
Also add unittests for url_incdec_number
2015-08-07 18:48:07 +02:00
Florian Bruhin
7e7fe9b4ce Simplify utils.qualname, take two. 2015-08-04 10:39:34 +02:00
Florian Bruhin
c67f7b6b21 Simplify utils.qualname. 2015-08-04 10:36:35 +02:00
Florian Bruhin
27f65be860 Merge branch 'referer-header' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-referer-header
Conflicts:
      tests/utils/test_urlutils.py
2015-08-01 12:44:57 +02:00
Florian Bruhin
69ade32cb9 Get rid of quickmark_by_name completion. 2015-07-29 12:35:43 +02:00
Antoni Boucher
523cb458a6 Merge remote-tracking branch 'upstream/master' 2015-07-12 10:52:32 -04:00
Florian Bruhin
ca5a78dfc7 Attach numerical code to Qt OSErrors and fix tests.
This fixes tests with tox < 2.0.0 on systems with a non-english locale, as it's
no longer the errorString which gets compared.

Fixes #806.
2015-07-12 11:20:28 +02:00
Antoni Boucher
fe829699be Merge remote-tracking branch 'upstream/master' 2015-07-11 17:40:43 -04:00
Florian Bruhin
c5b75b0b16 Merge remote-tracking branch 'origin/usertypes-tests' 2015-07-06 17:58:13 +02:00
Florian Bruhin
3f13c2bd3e Add/improve tests for qutebrowser.utils.urlutils. 2015-07-06 17:10:57 +02:00
Florian Bruhin
e3fcc0e091 Move isabs check to top in fuzzy_url. 2015-07-06 17:10:24 +02:00
Florian Bruhin
4e0d00098c Improve NeighborList tests. 2015-07-02 21:10:56 +02:00
Florian Bruhin
7b8490b6c0 Fix 'an user' spelling. 2015-06-29 17:49:19 +02:00
Martin Tournoij
a346644c71 Changed:
- same_domain: If the tld is unknown, only return True if the hostnames are the same
- Fix when starting without an open page
2015-06-27 21:15:54 +02:00
Martin Tournoij
f806eefba6 Merge branch 'master' into referer-header 2015-06-27 20:43:54 +02:00
Florian Bruhin
e9b5c355d2 Add a short=True argument to version.version().
Fixes #787.
2015-06-26 22:33:29 +02:00
Florian Bruhin
75b894a186 Include DESKTOP_SESSION in qute:version. 2015-06-24 20:54:37 +02:00
Florian Bruhin
220ac021f0 Print style name in version info. 2015-06-24 20:37:48 +02:00
Florian Bruhin
9ca06ecfa2 Use pkg_resources instead of distutils for version
Fixes #767. See #770.
2015-06-18 20:54:05 +02:00
Florian Bruhin
b1334bcc22 Use repr() for unknown objects in utils.qualname. 2015-06-17 06:46:03 +02:00
Florian Bruhin
70699988ed Fix context managers behavior on exceptions. 2015-06-15 06:19:14 +02:00
Florian Bruhin
f17131f6c2 Change Qt links to point to qt.io. 2015-06-12 16:59:33 +02:00
Florian Bruhin
84a269f36a Add missing keys to key_to_string. 2015-06-12 16:37:17 +02:00
Florian Bruhin
425fcdf8e4 Merge branch 'util-tests-1' 2015-06-12 11:50:57 +02:00
Florian Bruhin
163bc2e12e Add GUIProcess.
This aims to unify the code which spawns a process and then shows statusbar
notifications when it exited, etc.
2015-06-11 20:30:03 +02:00
Florian Bruhin
17bb9fc21c Use QProcess instead of subprocess.
Closes #646.
Fixes #688.
2015-06-11 20:28:04 +02:00
Florian Bruhin
67e895b6c7 Hide SetProcessDpiAwareness Qt warning.
This shows up on AppVeyor CI for some reason.
See https://bugreports.qt.io/browse/QTBUG-38993
2015-06-10 18:35:33 +02:00
Florian Bruhin
e60f698615 Add/improve tests for qutebrowser.utils.standarddir. 2015-06-07 23:20:34 +02:00
Florian Bruhin
df53ccf426 Write tests for qutebrowser.utils.version. 2015-06-07 23:20:34 +02:00
Florian Bruhin
4204579c06 Add/improve tests for qutebrowser.utils.utils. 2015-06-07 22:53:30 +02:00
Antoni Boucher
cf4b89efe3 Merge remote-tracking branch 'upstream/master' 2015-06-07 14:38:17 -04:00
Florian Bruhin
a82b0d007d Enforce a Qt with SSL support. 2015-06-07 10:47:28 +02:00
Florian Bruhin
def41e70bf Fix some spelling mistakes. 2015-06-07 01:24:02 +02:00
Martin Tournoij
463e85ff5d Add referer-header setting, #712 2015-06-05 18:00:21 +02:00
Florian Bruhin
9ec6e6da80 Fix exit status codes to be 0-based. 2015-06-04 15:13:20 +02:00
Florian Bruhin
f1c0781a4c Use sip.SIP_VERSION_STR to get sip version. 2015-06-01 09:09:10 +02:00
Antoni Boucher
1698c60124 Merge remote-tracking branch 'upstream/master' 2015-05-31 15:59:46 -04:00
Florian Bruhin
81345eb17e Hide some QXcbWindow warnings. 2015-05-31 00:11:33 +02:00
Florian Bruhin
6452c8f883 PyQIODevice: Add context manager support. 2015-05-26 20:57:11 +02:00
Florian Bruhin
b8dd71a343 PyQIODevice: Add .open()/.close(). 2015-05-26 20:57:11 +02:00
Florian Bruhin
460308f388 PyQIODevice: Don't use errorString for failed seek. 2015-05-26 20:57:11 +02:00
Florian Bruhin
6a26bc23ab PyQIODevice: Remove unneeded check. 2015-05-26 20:57:11 +02:00
Florian Bruhin
48de8b145b PyQIODevice: Properly fix read/readLine. 2015-05-26 20:57:01 +02:00
Florian Bruhin
0788054dd3 PyQIODevice: Expose underlying device. 2015-05-26 20:57:01 +02:00
Florian Bruhin
b2d763f993 PyQIODevice: Check if device is readable/writable. 2015-05-26 20:57:01 +02:00
Florian Bruhin
35f0b26f4a PyQIODevice: Remove readinto().
Our implementation was broken, and the BufferedIOBase mixin does a better job
at doing this.
2015-05-26 20:57:01 +02:00
Florian Bruhin
ba9c782824 PyQIODevice: First attempt at fixing read().
This was completely broken because one read overload doesn't exist in PyQt and
apparently it was never tested...
2015-05-26 20:56:51 +02:00
Florian Bruhin
fa69786b0f PyQIODevice: Raise ValueError when closed. 2015-05-26 20:49:58 +02:00
Florian Bruhin
e10da78a1a urlutils: Remove some more dead code. 2015-05-26 20:49:43 +02:00
Florian Bruhin
27e82ce6c8 Improve exception handling in qsavefile_open.
Sometimes exceptions were shadowed with new exceptions because of the file
flushing.
2015-05-26 19:25:05 +02:00
Florian Bruhin
120d2e12b0 Improve QtValueError wording for ensure_not_null. 2015-05-25 01:21:57 +02:00
Antoni Boucher
ece32e930c Added bookmarks command. 2015-05-24 19:18:40 -04:00
Florian Bruhin
8d15bbdded utils.version: Add SIP line on ImportError. 2015-05-24 21:00:46 +02:00
Antoni Boucher
2c0c2e220e Fixed style issue. 2015-05-21 19:38:30 -04:00
Antoni Boucher
28caf45707 First version of bookmarks. 2015-05-21 18:17:22 -04:00
Florian Bruhin
aaab05793e urlutils: Handle localhost correctly in all cases. 2015-05-20 13:36:40 +02:00
Florian Bruhin
ddb6743b26 urlutils: Clean up qurl_from_user_input in is_url. 2015-05-20 13:36:40 +02:00
Florian Bruhin
269676318b urlutils: Raise exception on errors in host_tuple. 2015-05-20 13:36:40 +02:00
Florian Bruhin
6f904759b5 urlutils: Fix str() of FuzzyUrlError. 2015-05-20 13:36:40 +02:00
Florian Bruhin
f8db4b8147 urlutils: Improve debug logging. 2015-05-20 13:36:40 +02:00
Florian Bruhin
14df72a7a1 urlutils: Add get_errstring(). 2015-05-20 13:36:40 +02:00
Florian Bruhin
e590bf26ad urlutils: Check bogus IPs in _is_url_dns. 2015-05-20 13:36:40 +02:00
Florian Bruhin
40cc354030 urlutils: Pass URL string to _is_url_dns. 2015-05-20 13:36:40 +02:00
Florian Bruhin
c0b41d8c62 urlutils: Use utils.raises in _is_url_naive. 2015-05-20 13:36:40 +02:00
Florian Bruhin
1f048a38f8 urlutils: Remove dead code in _get_search_url.
term should always contain something.
2015-05-20 13:36:40 +02:00
Florian Bruhin
e187cda292 Sort attrs for utils.get_repr(). 2015-05-19 16:23:50 +02:00
Florian Bruhin
8941b5dc96 Merge branch 'visual' 2015-05-18 21:43:25 +02:00
Florian Bruhin
81ba49e79b Fix tests on OS X, take two. 2015-05-17 18:59:40 +02:00
Florian Bruhin
10985c3505 Fix handling of Meta/Control on OS X.
Fixes #110.
See #420.

See http://doc.qt.io/qt-5.4/osx-issues.html#special-keys :

    To provide the expected behavior for Qt applications on OS X, the Qt::Meta,
    Qt::MetaModifier, and Qt::META enum values correspond to the Control keys
    on the standard Apple keyboard, and the Qt::Control, Qt::ControlModifier,
    and Qt::CTRL enum values correspond to the Command keys.
2015-05-17 18:44:36 +02:00
Florian Bruhin
b619d835e6 Make usertypes.Exit an IntEnum. 2015-05-17 00:29:28 +02:00
Florian Bruhin
3f98bf372e Merge branch 'smoke'
Conflicts:
      doc/qutebrowser.1.asciidoc
      qutebrowser/app.py
      qutebrowser/config/config.py
      qutebrowser/qutebrowser.py
      tox.ini
2015-05-17 00:28:56 +02:00
Florian Bruhin
9be5992a9a Smoke test WIP 2015-05-16 23:43:34 +02:00
Florian Bruhin
54131e9d3e Add --basedir arg with multiple instance support.
Closes #510.
2015-05-16 23:10:20 +02:00
Florian Bruhin
c762340a0c Add --datadir/--cachedir arguments. Closes #136. 2015-05-16 22:12:27 +02:00
Florian Bruhin
7e2c67a7e4 Fix tests/lint. 2015-05-15 20:25:29 +02:00
Florian Bruhin
12940eb542 Handle QtInfoMsg (Qt 5.5) in qt_message_handler. 2015-05-15 20:15:09 +02:00
Artur Shaik
489c913e58 Implement caret selection and positioning
Added option to webview for selection enabled caret mode.
In status bar checking value of this option to identificate about it.

Added bindings: <Space> for toggle selection mode, <Ctrl+Space> drop
selection and keep selection mode enabled.

In webview added javascript snippet to position caret at top of the
viewport after caret enabling. This code mostly was taken from cVim sources.
2015-05-05 12:21:48 +06:00
Florian Bruhin
d3a7b2e4ca Big refactoring of app.py. 2015-04-30 07:37:25 +02:00
Florian Bruhin
6c8e073dc8 Merge branch 'caret_visual_mode' of https://github.com/artur-shaik/qutebrowser into visual
Conflicts:
      qutebrowser/browser/commands.py
      qutebrowser/browser/webview.py
      qutebrowser/config/configdata.py
2015-04-21 21:29:00 +02:00
Florian Bruhin
a6e3199616 Fix binding of special keys with lower-case mods. 2015-04-13 22:08:57 +02:00
Florian Bruhin
39f7850942 Fix lint. 2015-04-13 08:52:58 +02:00
Florian Bruhin
c071bcbec8 Clean up loggers. 2015-04-13 08:49:04 +02:00
Artur Shaik
695712e50c Basic caret and visual modes implementation
Allow user switch in caret mode for browsing with caret, and visual mode
for select and yank text with keyboard.

Default keybindings is c or v for caret mode, and again v for visual mode. All
basic movements provided by WebAction enum implemened with vim-like
bindings. Yanking with y and Y for selection and clipboard respectively.

There is bug/feature in WebKit that after caret enabled, caret doesn't
show until mouse click (or sometimes Tab helps). So I add some workaround
for that with mouse event. I think should be better aproach.

Signed-off-by: Artur Shaik <ashaihullin@gmail.com>
2015-04-09 22:55:42 +06:00
Florian Bruhin
76651822bd Merge pull request #16 from hackebrot/layout
Adopt test layout to pytest.
2015-04-08 14:03:02 +02:00
Florian Bruhin
4e2ef45cd8 Ignore Qt warning about WOFF/zlib. 2015-04-07 13:00:26 +02:00
Bruno Oliveira
3de584f02c Moving testfile used by test_utils into qutebrowser.utils 2015-04-04 19:15:23 -03:00
Florian Bruhin
eeb875d098 Handle unavailable registry in on_focus_changed. 2015-04-01 00:02:29 +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
5233e7fac8 Fix UnboundLocalError on invalid quickmarks.
This also improves FuzzyUrlError messages.
2015-03-29 21:20:42 +02:00
Florian Bruhin
82322beb03 Fix pep257 issues. 2015-03-26 07:08:54 +01:00
Florian Bruhin
e7f5433da3 Enable python warnings earlier and unconditionally. 2015-03-23 07:40:22 +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
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
2dcf323077 Add missing docstrings. 2015-03-17 06:39:02 +01:00
Florian Bruhin
70cd8e74eb Measure time it takes to init URL completion. 2015-03-14 13:32:47 +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
34b24aafa8 Fix lint 2015-03-11 22:22:49 +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
e8e6d8409b Adjust pylint exceptions. 2015-03-11 20:14:39 +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
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
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
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
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
9d716d74b4 Fix lint. 2015-02-25 18:01:30 +01:00
Florian Bruhin
caad56c978 Print stacktrace on Qt warnings. 2015-02-24 07:12:25 +01:00
Florian Bruhin
c5a2039da4 Refactor QStandardPaths handling. 2015-02-22 19:13:51 +01:00
Florian Bruhin
359482b511 Fix getting Qt arguments. 2015-02-21 18:52:14 +01:00
Florian Bruhin
9534deb2e7 Add a context manager to unset organizationName. 2015-02-18 22:18:55 +01:00
Florian Bruhin
8f1d81a644 Add session support.
Closes #12.
See #499.
See #11.

This adds PyYAML as a new dependency.

It adds the following new commands:

    :session-delete <name>
    Delete a session.

    :session-load <name>
    Load a session.

    :session-save [<name>]
    Save a session.

    :wq [<name>]
    Save open pages and quit.

And the following new settings:

    general -> save-session:
    Whether to always save the open pages.
2015-02-16 20:26:09 +01:00
Florian Bruhin
53b024f246 docutils: Fix handling of ", or None ...". 2015-02-14 19:41:10 +01:00
Florian Bruhin
fba2b2b5ae fuzzy_url: handle invalid URLs with autosearch off
Fixes #497.
2015-02-02 22:24:01 +01:00
Florian Bruhin
a95dda8e92 Handle explicit searches with auto-search=false.
See #497.
2015-02-02 22:19:43 +01:00
Florian Bruhin
59a11c178f Don't open relative files in fuzzy_url with :open
With most actions which use fuzzy_url (:open/quickmarks/etc.) it's rather
confusing when relative files are opened - the only place where they should be
opened is when we're processing a commandline argument.
2015-02-01 23:55:37 +01:00
Florian Bruhin
43c5dc3bf6 Refactor saving logic, only save stuff if modified.
Fixes #113.
See #11.
2015-02-01 00:43:07 +01:00
Florian Bruhin
7169d02609 Support running qutebrowser without SSL. 2015-01-26 13:15:08 +01:00
Florian Bruhin
223f8f243e Make it possible to display warnings in the bar.
Closes #114.
2015-01-15 22:29:00 +01:00
Florian Bruhin
8c227324fe Use qurl_from_user_input() in urlutils.is_url().
It seems 354018efcd broke IPv6 IPs on older Qt
versions:

======================================================================
FAIL: test_urls (qutebrowser.test.utils.test_urlutils.IsUrlTests) (url='2001:41d0:2:6c11::1')
Test things which are URLs.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/buildbot/slaves/slave/ubuntu-utopic/build/qutebrowser/test/utils/test_urlutils.py", line 168, in test_urls
    self.assertTrue(urlutils.is_url(url), url)
AssertionError: False is not true : 2001:41d0:2:6c11::1
2015-01-09 22:13:23 +01:00
Florian Bruhin
a412814dee Enter KeyMode.normal directly in ModeManager.
We used to enter KeyMode.none and then with a zero-time singleShot QTimer enter
the normal mode. This doesn't really make sense, and caused an exception if a
keypress was processed before the timer fired.

Fixes #433.
2015-01-09 21:49:39 +01:00
Florian Bruhin
354018efcd Make sure QUrl::fromUserInput is valid in is_url.
Fixes #460.

Without this fix, it's possible for URLs to be valid according to is_url, but
not according to QUrl::fromUserInput, e.g. "http:foo:0". This caused an
exception later because fuzzy_url runs qtutils.ensure_valid.
2015-01-09 21:49:26 +01:00
Florian Bruhin
5fc900a1cb Merge branch 'master' of https://github.com/balanceofcowards/qutebrowser into balanceofcowards-master 2015-01-08 23:09:58 +01:00
Andreas Fischer
34c9a73e32 Fix bug #399 (crashes on systems with pyqt < 5.3)
Crash occurs in usertypes.py / Question class due to Python slots
being called on deleted Qt objects. This causes either a TypeError or
an AttributeError (probably depending on the state of the deleted Qt
object?).

Fixed by declaring slots in the Question object explicitly via
decorator "@pyqtSlot()".

Possible further TODOs:
- Find out whether this is a problem for slots in other objects as
  well.
- Create unittest for this bug (might me somewhat tricky, though).
2015-01-08 09:52:53 +01:00
Florian Bruhin
b12b83f98c Hide 2 more Qt warnings. 2015-01-07 06:59:48 +01:00
Florian Bruhin
e54d3c21ee Add SSL info to version info. 2015-01-03 18:19:16 +01:00
Florian Bruhin
7dbbfedd3b Replace unencodable chars in download filenames.
Fixes #427.
2015-01-03 17:50:59 +01:00
Florian Bruhin
450d1ab70d Update copyright years 2015-01-03 15:51:31 +01:00
Florian Bruhin
f1435ce51f Use a dirty hack to copy icon files into package.
See #325.
2014-12-28 14:50:25 +01:00
Florian Bruhin
2a4e884e1b Set window icon. Closes #325. 2014-12-28 14:35:28 +01:00
Florian Bruhin
03ac8874ff Rewrite keymode handling to use only one mode.
Fixes #417.
Fixes #418.
See 4ab5d2df28.
2014-12-28 00:01:27 +01:00
Florian Bruhin
bf4d6a5707 Handle an invalid cwd properly.
Fixes #370.
2014-12-26 15:07:18 +01:00
Florian Bruhin
dec6842370 Remove unnecessary if-branch in fuzzy_url.
The first branch already checks for `os.path.exists(path)`, so it doesn't make
sense for the second one to check that again (ANDed with some other condition).
2014-12-26 15:03:30 +01:00
Florian Bruhin
017f143a5f Add a binary mode to utils.read_file.
This will be needed for #325.
2014-12-22 23:44:09 +01:00
Florian Bruhin
4363db90c0 Don't treat things like "31c3" as IP address.
Fixes #388.
2014-12-22 18:38:45 +01:00
Florian Bruhin
57c8dff396 Handle category being None in Qt message handler.
Fixes #397.
2014-12-22 17:33:35 +01:00
Florian Bruhin
877d814815 Clean up _get_window_registry. 2014-12-21 14:13:40 +01:00
Florian Bruhin
05e835684d Fix item sorting in NeighborList.
See #361.
2014-12-18 23:20:38 +01:00
Florian Bruhin
29ce0a5157 Fix handling of small/big fuzzyval's in NeighborList.
This fixes an exception when having a really big or small zoom (e.g. 0) and
then using +/-.

Fixes #361.
2014-12-18 23:04:43 +01:00
Florian Bruhin
512d7c4448 Simplify config exception tree and handling.
Also make sure we catch all config-related errors in all related places.
Fixes #324.
2014-12-17 11:17:18 +01:00
Florian Bruhin
06ec1a3885 Big file tree reorganisation.
Closes #255.
Should make a lot more sense now ;)
2014-12-13 17:28:50 +01:00
Florian Bruhin
fc0428ef5f Fix ws stripping with simple_split and no flags.
Fixes #279.
2014-12-12 17:29:01 +01:00
Florian Bruhin
decfd02033 Use a QNAM to pastebin from crash dialog.
Fixes #280.
2014-12-11 23:34:03 +01:00
Florian Bruhin
cba120ac76 Fix starting without config. 2014-12-11 22:08:43 +01:00
Florian Bruhin
8bad7c0e4c Use maxsplit=1 for :repeat and :later. 2014-12-11 21:27:44 +01:00
Florian Bruhin
8c4c465c91 Fix completion update when the length is unchanged.
Fixes #312.
2014-12-11 18:37:22 +01:00
Florian Bruhin
0ecf8661eb Create inexistent paths in standardpath.get.
See #25.
2014-12-10 18:05:42 +01:00
Florian Bruhin
ec07e4f8be Handle OSError exceptions where appropriate.
Fixes #25.
2014-12-10 18:00:49 +01:00
Florian Bruhin
ea76bdfb0f Replace all IOError by OSErrors.
Starting with Python 3.3, IOError is just an alias for OSError.
2014-12-10 16:48:23 +01:00
Florian Bruhin
0b82fdb4d8 Fix text/newline handling with QSaveFile.
Fixes #309.

We use io.TextIOWrapper which already handles newline converting, so we
shouldn't open the QSaveFile with QIODevice.Text in the mode, as this lead to
double-converting newlines, which in turn produced this error message on
Windows.
2014-12-10 10:58:55 +01:00
Florian Bruhin
bf24578dfd Use QSaveFile for saving files. Fixes #234. 2014-12-08 23:42:26 +01:00
Florian Bruhin
24d21bfe98 I suck. 2014-12-05 21:15:11 +01:00
Florian Bruhin
9946b4b0f6 Really disable that damn pylint check 2014-12-05 21:14:18 +01:00