Commit Graph

616 Commits

Author SHA1 Message Date
Florian Bruhin
750ef834dc Make PyOpenGL a required dependency
Looks like the "black screen" issue isn't the only thing going wrong, some
people even report segfaults since the vendor check was added.
2017-06-20 13:05:53 +02:00
Florian Bruhin
f838eb1bdc Use named formatting for queries in sql.py 2017-06-20 12:11:41 +02:00
Florian Bruhin
da875755d1 Add spaces after commas in SQL queries 2017-06-20 12:06:17 +02:00
Florian Bruhin
c1776bbf9d Add error message when query failed to prepare 2017-06-20 12:05:40 +02:00
Florian Bruhin
29ce1b3811 Add column order in SqlTable._insert_query
_insert_query gets called with a query and dict of values such as:

  {'val': 1, 'lucky': False, 'name': 'one'}

Via bindValues(), we only assign a placeholder in the query string to a value,
so we get a query with bindings like:

  INSERT INTO Foo values(:lucky,:val,:name)
  {':name': 'one', ':val': 1, ':lucky': False}

So what we're executing is something like:

  INSERT INTO Foo values(false,1,"one")

However, if the column order in the database doesn't happen to be the order
we're passing the values in, we get the wrong values in the wrong columns.

Instead, we now do:

  INSERT INTO Foo (lucky, val, name) values(false,1,"one")

Which inserts the values in the order we intended.

With Python 3.6, this just happened to work before because we always passed the
keyword arguments in the table column order, and in 3.6 dicts
(and thus **kwargs) happen to be ordered:
https://mail.python.org/pipermail/python-dev/2016-September/146327.html
2017-06-20 12:03:43 +02:00
Ryan Roden-Corrent
4e87773d89 Use a dict instead of named params for insert.
This allows replace to be a named parameter and allows consolidating
some duplicate code between various insert methods.

This also fixes some tests that broke because batch insert was broken.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
e436f48164 Small sql fixes.
- Remove unused SqlTable.Entry
- Fix wording of two log messages
- Remove unused import
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
1fe1813431 Fix pylint errors. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
22b7b21d5a Use named placeholders for sql queries. 2017-06-19 07:44:11 -04:00
Florian Bruhin
9b0395db08 Add an lru cache for WebHistoryInterface.historyContains
When loading heise.de, for some crazy reason QtWebKit calls historyContains
about 16'000 times.

With this cache (which we simply clear when *any* page has been loaded, as then
the links which have been visited can change), that's down to 250 or so...
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
6fc61d12fc Assorted small fixes for sql code review. 2017-06-19 07:44:11 -04:00
Florian Bruhin
57d96a4512 Add a CompletionHistory instead of HistoryVisits table 2017-06-19 07:44:11 -04:00
Florian Bruhin
c64b7d00e6 Add separate table for history visits 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
ea0b3eee05 Use full, not partial index for history.
historyContains includes redirect urls, so we actually don't want a
partial index here.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
478a719f77 Use a prepared query for historyContains.
This is called often, hopefully a prepared query will speed it up.
This also modifies Query.run to return self for easier chaining, so you
can use `query.run.value()` instead of `query.run` ; query.value()`.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
5b827cf86a Fix typo in sql exception handling 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
6a0fc5afd2 Create a SQL index on History.url.
This will hopefully speed up historyContains but does not seem to speed
up the completion query, unfortunately.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
cf89ffa971 Fix pylint/flake8 errors 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
e67da51662 Use prepared SQL queries. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
20000088de Add debug-dump-history and fix sql history tests.
Trying to read from the sql database from another process was flaky.
This adds a debug-dump-history command which is used by the history BDD
tests to validate the history contents.

It outputs history in the old pre-SQL text format, so it might be
useful for those who want to manipulate their history as text.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
0aa0478327 Use EXISTS for SqlTable.contains. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
784d9bb043 Remove code rendered dead by sql implementation.
Vulture exposed the following dead code:

- AppendLineParse was only used for reading the history text file, which is now
  a sql database (and the import code for the old text file is simpler and does
  not need a complex line parser)

- async_read_done is no longer used as importing the history text file is
  synchronous (and should only happen once)

- config._init_key_config is unused as it was moved to keyconf.init
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
f110cf4d53 Fix long hang after importing history.
Turns out historyContains was getting called for the webkit backend multiple
times when the browser starts. This was calling `url in history`, which was
enumerating the entire history as `__contains__` was not defined.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
8ff45331df Clean up sql implementation.
Now that sql is only used for history (not quickmarks/bookmarks) a number of
functions are no longer needed. In addition, primary key support was removed as
we actually need to support multiple entries for the same url with different
access times. The completion model will have to handle this by selecting
something like (url, title, max(atime)).

This also fixes up a number of tests that were broken with the last few
sql-related commits.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
80647b062a Convert old history file to sqlite.
If qutebrowser detects a history text file when it starts
(~/.local/share/qutebrowser/history by default on Linux), it will import this
file into the new sqlite database, then delete it.

The read is done as a coroutine as it can take some time.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
de5be0dc5a Store history in an on-disk sqlite database.
Instead of reading sqlite history from a file and storing it in an in-memory
database, just directly use an on-disk database. This resolves #755, where
history entries don't pop in to the completion menu immediately as they are
still being read asynchronously for a few seconds after the browser starts.
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
56f3b3a027 Small review fixups for SQL implementation.
Respond to the low-hanging code review fruit:

- Clean up some comments
- Remove an acidentally added duplicate init_autosave
- Combine two test_history tests
- Move test_init cleanup into a fixture to ensure it gets called.
- Name the _ argument of bind(_) to _key
- Ensure index is valid for first_item/last_item
- Move SqlException to top of module
- Rename test_index to test_getitem
- Return QItemFlags.None instead of None
- Fix copyright dates (its 2017 now!)
- Use * to force some args to be keyword-only
- Make some returns explicit
- Add sql to LOGGER_NAMES
- Add a comment to explain the sql escape statement
2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
a050cb94f6 Report sqlite version with --version. 2017-06-19 07:44:11 -04:00
Ryan Roden-Corrent
02fb1a037c Implement canFetchMore for SQL completion.
This just forwards canFetchMore and fetchMore to the underlying tables.
It seems to be returning True and fetching in some cases (with a large
history), so I guess it is useful?
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
ffd044b52b Fix pylint and flake8 for SQL work.
Vanity commit. This also touches up a few comments.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
0e650ad719 Return namedtuples from SqlTable.
Instead of returning a regular tuple and trying to remember which index maps to
which field, return named tuples that allow accessing the fields by name.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
df995c02a3 Get rid of varargs in sql.run_query.
Things are clearer when just passing a list.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
b70d5ba901 Use QSqlQueryModel instead of QSqlTableModel.
This allows setting the query as a QSqlQuery instead of a string, which allows:

- Escaping quotes
- Using LIMIT (needed for history-max-items)
- Using ORDER BY (needed for sorting history)
- SELECTing columns (needed for quickmark completion)
- Creating a custom select (needed for history timestamp formatting)
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
f43f78c40f Implement SQL interface.
When qutebrowser starts, it creates an in-memory sqlite database. One
can instantiate a SqlTable to create a new table in the database. The
object provides an interface to query and modify the table.

This intended to serve as the base class for the quickmark, bookmark,
and history manager objects in objreg. Instead of reading their data
into an in-memory dict, they will read into an in-memory sql table.

Eventually the completion models for history, bookmarks, and quickmarks
can be replaced with SqlQuery models for faster creation and filtering.

See #1765.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
3b30b42211 Remove completion.instances, usertypes.Completion.
The new completion API no longer needs either of these. Instead of
referencing an enum member, cmdutils.argument.completion now points to
a function that returnsthe desired completion model.
This vastly simplifies the addition of new completion types. Previously
it was necessary to define the new model as well as editing usertypes
and completion.models.instances. Now it is only necessary to define a
single function under completion.models.

This is the next step of Completion Model/View Revamping (#74).
2017-06-19 07:42:12 -04:00
Florian Bruhin
df6c4c6e73 Fix earlyinit.qt_version issues 2017-06-19 09:42:49 +02:00
Florian Bruhin
6c534bea6b Actually remove version import in earlyinit... 2017-06-19 08:59:26 +02:00
Florian Bruhin
fdba676933 Move version.qt_version() to earlyinit
Importing version in earlyinit is a bad idea, as it already pulls in a lot of
stuff we don't want.
2017-06-19 08:57:29 +02:00
Florian Bruhin
722c117d54 Better handling of OpenSSL 1.1
Fixes #2690
2017-06-02 21:52:53 +02:00
Florian Bruhin
a90429fe6e Update needed dependencies
Fixes #2683
2017-06-01 19:30:32 +02:00
Florian Bruhin
a690d242a4 Update webengine dependency message 2017-06-01 14:03:46 +02:00
Florian Bruhin
7186dcb98f Send crash reports to private pastebin
Fixes #481
2017-05-29 09:20:10 +02:00
Florian Bruhin
8bd6974042 Open a window with an empty session
With general -> save-session on and only private windows open, we can easily get
a session file with "windows: []" in it. If we loaded such a file, we got no
windows at all when qutebrowser started.

Fixes #2664
2017-05-28 11:15:51 +02:00
Florian Bruhin
c32c01ffc0 Merge commit '419793c0b9ff4f293babea7623dcaf4787bbaa35' 2017-05-22 07:55:44 +02:00
Jay Kamat
00f001729b
Fix undo with pinned tabs
Add tests for undo with a pinned tab
Add tests for clone with a pinned tab
2017-05-21 21:03:33 -07:00
Jay Kamat
2a961c3951
Clean up pinned status to a centralized location
- Add support for :tab-clone with pinned tabs

Now tabbed_browser.set_tab_pinned can be called independently.
2017-05-21 19:49:10 -07:00
Florian Bruhin
00a7a0cee6 Reorganize pylint config
This removes various stuff we don't need anymoe, and also re-enables and fixes
the import order check.
2017-05-17 20:20:12 +02:00
Florian Bruhin
adb924a758 Use -p for :save-session --with-private 2017-05-16 06:28:21 +02:00
Florian Bruhin
6ee382ef30 Sort windows when saving sessions
This should help with flaky tests when the window order changes
2017-05-15 11:02:29 +02:00
Florian Bruhin
9805b43c85 Handle private browsing in sessions 2017-05-15 11:02:29 +02:00
Florian Bruhin
f907b6b6b0 Have an isolated command history for private windows 2017-05-15 11:02:26 +02:00
Jay Kamat
725bafea54
Merge branch 'master' into jay/pintab 2017-05-10 23:51:33 -07:00
Florian Bruhin
c6e31391de Fix most tests/lint 2017-05-10 09:19:24 +02:00
Florian Bruhin
1c50377c0a Initial work on new private browsing 2017-05-10 07:00:21 +02:00
Florian Bruhin
822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Florian Bruhin
1d0f187fab Adjustments for new pylint version 2017-04-13 18:22:16 +02:00
Fritz Reichwald
3d549bf607 Remove closeWriteChannel from detached start 2017-04-12 07:32:12 +02:00
Fritz Reichwald
bc7f8018c0 Close stdin after starting QProcess Fixes 2491 2017-04-12 06:56:38 +02:00
Jacob Sword
45dff6c0c8 update usage of debug-flag arguments 2017-04-08 16:54:08 -04:00
Florian Bruhin
4ec5700cbf Redirect qute:foo to qute://foo
Before, we just returned the same data for both, but then we'll run into
same-origin restrictions as qute:history and qute:history/data are not the same
host.
2017-04-06 21:18:58 +02:00
Martin Tournoij
e7755f5d9f
Add :debug-log-filter none
This allows us to clear any filters. Useful for users, and needed for
the tests.
2017-04-04 20:51:14 +01:00
Martin Tournoij
200e439a30
Fix crash of :debug-log-filter when --filter wasn't given
There was no `LogFilter`. The fix is to always initialize a
`LogFilter()` with `None`. as the "filter".

Fixes #2303.
2017-04-04 17:45:23 +01:00
Martin Tournoij
79a22f1f47
Allow pressing ^C when there's an unknown setting
All of it is just converting `objreg.get('xxx')` to `objreg.get('xxx',
None)` and adding a `if xxx is not None` check.

Fixes #1170
2017-04-01 21:14:35 +01:00
Florian Bruhin
1eda2b0ea4 Fallback to clipboard when primary selection is unsupported 2017-03-31 13:05:34 +02:00
Florian Bruhin
64feb62fb1 Paste clipboard when using shift-insert in prompts 2017-03-31 13:05:34 +02:00
Florian Bruhin
a55d1b1ee8 Save old socket for IPC
At least on Windows with Qt 5.8, we get readyRead notifications *after*
disconnect...
2017-03-31 13:03:17 +02:00
Ryan Roden-Corrent
a68f997d95 Make keyhint delay configurable.
ui.keyhint-delay controls the time from starting a keychain to showing the
keyhint dialog. Resolves #2462.
2017-03-22 21:50:26 -04:00
thuck
650b1de3b6 Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2017-03-19 14:26:48 +01:00
Florian Bruhin
99c7301fb4 Update IPC atime once all 3h
See #996
2017-03-16 09:24:49 +01:00
Florian Bruhin
8d9030ec47 Use debug log for on_timeout message 2017-03-13 07:01:21 +01:00
Florian Bruhin
eb2888a957 Merge commit 'd3b16bbd075f9e8c8656a402975d776088c2dab8' into pkill-nine/upstream-master-close_messages 2017-03-08 19:19:30 +01:00
Florian Bruhin
4278cd5e3e Remove unused operator imports 2017-03-08 19:10:29 +01:00
pkill9
d3b16bbd07 Add command to clear messages - cleaner 2017-03-08 10:49:15 +00:00
Florian Bruhin
f86f9cd92a Refactor qtutils.version_check API
Fixes #2423
2017-03-08 08:41:18 +01:00
Florian Bruhin
a1c7d179e3 Only call QApplication::sync() with QtWebEngine 2017-03-05 15:16:14 +01:00
Florian Bruhin
5ccafd62d4 Fix initial keyboard focus with QtWebEngine
Fixes #2321.
2017-03-04 18:11:34 +01:00
Florian Bruhin
e81edc8224 ipc: Delay deleting of QLocalSocket on disconnect
Fixes #2396.

See https://bugreports.qt.io/browse/QTBUG-59297 and
https://github.com/qutebrowser/qutebrowser/issues/2321#issuecomment-284024213
2017-03-04 18:11:34 +01:00
Florian Bruhin
1e42fd1319 Fix lint 2017-03-01 11:12:28 +01:00
Florian Bruhin
47a9c8e17c Also check compiled Qt version in version checks 2017-02-28 21:01:47 +01:00
Florian Bruhin
fc2250b3b2 Merge branch 'session-save-only-active-window' of https://github.com/danfis/qutebrowser into danfis-session-save-only-active-window 2017-02-25 17:55:42 +01:00
Florian Bruhin
cd2c547b6b Don't show error if no autosave session exists 2017-02-22 23:17:59 +01:00
Daniel Fiser
6e1ac8be78 Fixed indentation of SessionManager.save() arguments. 2017-02-22 10:37:55 +01:00
Daniel Fiser
bb5825e043 session-save: in case of --only-active-window, the win-id is determined in session_save(). 2017-02-22 10:22:30 +01:00
Daniel Fiser
bb74b2703f session-save: doc generated from docstring. 2017-02-22 09:59:29 +01:00
Florian Bruhin
b69d66e437 Actually check for Qt 5.7.1 2017-02-21 19:28:22 +01:00
Florian Bruhin
71f7b01ea7 Bring back PyQt (but not Qt) 5.7.0 support with QtWebEngine
This was originally removed in a86170f45, however Debian testing (Stretch) comes
with Qt 5.7.1, but PyQt 5.7.
2017-02-21 19:25:18 +01:00
Florian Bruhin
a179d6a738 Improve earlyinit Qt/PyQt version messages 2017-02-21 19:15:22 +01:00
Florian Bruhin
1708b38d7b Add SessionManager.{save,delete}_autosave 2017-02-20 07:43:41 +01:00
Florian Bruhin
ee25e900f8 Add error handling for autosave session 2017-02-20 06:44:23 +01:00
Florian Bruhin
a86170f45d Drop PyQt < 5.7.1 support for QtWebEngine 2017-02-17 14:42:57 +01:00
Florian Bruhin
2b76cca2b2 Improve earlyinit error messages 2017-02-12 21:19:58 +01:00
Florian Bruhin
87d1a2c7a3 Fix lint 2017-02-08 09:14:54 +01:00
Florian Bruhin
02198c4f65 Also check for QtWebKitWidgets in earlyinit 2017-02-08 00:57:47 +01:00
Daniel Fiser
c092840c04 Add optional argument --only-active-window to :session-save.
The new optional argument --only-active-window makes :session-save to
save only the tabs in the currently active window.
2017-02-07 10:38:41 +01:00
Florian Bruhin
29ffa3d134 Add a fullscreen notification overlay
From the spec:

  User agents should ensure, e.g. by means of an overlay, that the end user is
  aware something is displayed fullscreen. User agents should provide a means of
  exiting fullscreen that always works and advertise this to the user. This is
  to prevent a site from spoofing the end user by recreating the user agent or
  even operating system environment when fullscreen.

https://fullscreen.spec.whatwg.org/#security-and-privacy-considerations
2017-02-06 16:22:58 +01:00
Florian Bruhin
5e58764326 Fix lint 2017-02-05 19:52:59 +01:00
Florian Bruhin
9b843f24eb Re-enable segfault reports for QtWebEngine
Fixes #2174
2017-02-05 18:50:17 +01:00
Florian Bruhin
f3b39c55a0 Fix lint 2017-02-05 18:42:34 +01:00
Florian Bruhin
b1a95a3930 Add automatic backend selection in earlyinit 2017-02-05 17:09:04 +01:00
Florian Bruhin
de50f30b9b Replace all GitHub links 2017-02-05 00:13:11 +01:00
Florian Bruhin
148b34a50b Fix remaining Qt 5.8 QtWebEngine test failures 2017-02-04 13:28:38 +01:00
Florian Bruhin
90f472bf59 Temporary fix for Qt 5.8 segfaults
See #2261
2017-01-29 22:56:53 +01:00
Florian Bruhin
b47f90d24f Really fix Python 3.6 deprecation warnings
Before, the module regexes didn't actually work properly, but we thought the
warnings were gone as they only were shown once because of __pycache__.

Now we instead don't filter by module, but simply hide those messages globally
during the earlyinit dependency import (which is the first import).
2017-01-18 08:40:57 +01:00
thuck
b920de764f Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2016-11-23 08:10:11 +01:00
Florian Bruhin
81d67f8a2c Remove support for an empty data/config/cachedir
See #2115
2016-11-14 23:13:21 +01:00
thuck
9f70fa3ec8 Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2016-11-10 00:28:31 +01:00
thuck
d7f5f61f03 Implemented counter for total number of tabs
With this counter we can better control the space on the tabbar.
2016-11-09 23:50:41 +01:00
Florian Bruhin
df9bee33f4 Fix 100% coverage in misc.ipc 2016-11-08 21:56:54 +01:00
thuck
d8b5ca295e Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2016-11-08 19:53:46 +01:00
Florian Bruhin
57ee378ec5 Ignore None-socket in ipc.on_timeout 2016-11-08 12:17:44 +01:00
thuck
f9b1d998d4 Last configuration as pin changed to pinned 2016-11-07 22:32:42 +01:00
thuck
f8dffb4e5c Some modifications from initial feedback
Moved pin information from BrowserTab to TabData.
Changed attribute from pin to pinned.
Changed "ifs" to implicit check boolen value.
Removed blancked line on before else statement.
2016-11-07 08:02:25 +01:00
thuck
6f610e9c44 Initial development to support pin tabs #926
Done so far:
Two new commands pin/unpin, both accept a index to help the organization
(maybe this should be more a flag and not exactly two commands)
Crtl+p to pin, Crtl+O to unpin (not sure which should a good default
shortcut)
If user tries to close a pinned tab it's asked to confirm
If user tries to open a URL in a pinned tab it receives a message with a
information that the tab is pinned and ignore the openurl command
Preserve the pinned information across restart if session is activated

Missing:
Visual indication of the tab being pinned
Tab appearance being distinct over other tabs
Make pinned tabs to be the firsts on the tab bar

This is not ready, but it would be good to get some feedback earlier
2016-11-06 15:52:23 +01:00
Florian Bruhin
e3581a50ca Remove generated stylesheets again
We can just use jinja logic instead...
2016-11-03 08:40:41 +01:00
Daniel Karbach
c801caa19a log debug console status changes 2016-10-24 17:10:47 +02:00
Daniel Karbach
5d92934d76 less brutal synthetic segfault 2016-10-24 17:10:47 +02:00
Daniel Karbach
bdb96becd6 unit tests for misc.lineparser 2016-10-24 17:10:47 +02:00
Daniel Karbach
da2ba86aa5 use https for links in docs and elsewhere
refs #2039
2016-10-20 14:48:35 +02:00
Florian Bruhin
229faac9cb Stabilize :session-delete tests 2016-10-14 07:24:36 +02:00
Ryan Roden-Corrent
fbc084e416 Remove :<count>:cmd syntax support.
CommandRunner.parse had some logic for handling commands of form
:<count>:cmd. However, this complicated the parsing logic for something
that appears to only be used in tests. One could use it in a
userscript, but this is unlikely as it is undocumented. Removing
support for this simplifies the logic of parse.

The commnd `run-with-count` is added to provide this functionality.
It works like `repeat` but passes the count along to the command
instead of running the command multiple times.

This resolves #1997: Qutebrowser crashes when pasting commands.
This bug was caused by excess stripping of ':' from the command string
by _parse_count.
2016-10-10 08:02:30 -04:00
Florian Bruhin
f34d896ff4 Log total initialization time 2016-10-04 10:26:44 +02:00
Florian Bruhin
55cefd1ab7 Don't shadow outer name 2016-10-01 22:51:40 +02:00
Florian Bruhin
625bb7baa4 Clean up crash msgbox properly
Fixes #2004
2016-10-01 22:05:29 +02:00
Florian Bruhin
17ceba5ce4 Round correct edge for keyhint with top statusbar 2016-09-22 17:29:25 +02:00
Florian Bruhin
750dfd98af Generalize statusbar-attached website overlays
We already had some duplicated logic for completion/keyhint/messageview,
and plan to add prompt overlays too now - so here we refactor related
code to have a list of overlays instead, which are all
resized/positioned by the mainwindow when needed.

This also changes the size management, which gets moved into the
sizeHint of the respective overlay widgets.
2016-09-22 17:04:39 +02:00
Florian Bruhin
43fa5f55c1 Don't set QT_HARFBUZZ with Qt >= 5.4
Fixes #1948
2016-09-16 08:35:17 +02:00
Florian Bruhin
8403f2451f Add $PATH to crash info 2016-09-15 14:56:27 +02:00
Florian Bruhin
7e30792bfe Fix lint 2016-09-15 14:51:22 +02:00
Florian Bruhin
f16b96aa28 Initial implementation of new messages 2016-09-15 14:51:21 +02:00
Florian Bruhin
aa71c9ae58 Initial qute:* support for QtWebEngine 2016-09-14 10:18:25 +02:00
Florian Bruhin
4a2f0eea2f Fix import order in utilcmds 2016-09-11 20:29:19 +02:00
Florian Bruhin
4537b786f5 Ignore already deleted windows in :window-only 2016-09-11 20:29:05 +02:00
Florian Bruhin
f8f74400c6 Fix more lint 2016-09-07 18:57:00 +02:00
Florian Bruhin
d7f9e4735e earlyinit: Only display exception if there was one 2016-09-07 17:33:22 +02:00
Florian Bruhin
4d91ccfea5 Enforce Qt >= 5.6.0 for QtWebEngine 2016-09-07 17:31:48 +02:00
Florian Bruhin
7f013b7808 Fix lint 2016-09-06 17:00:25 +02:00
Florian Bruhin
f6ba859896 Move tabhistory.TabHistoryItem to misc.sessions
This makes browser.webkit.tabhistory contain only QtWebKit-specific
code.
2016-09-06 09:50:55 +02:00
Florian Bruhin
2658b7c4e7 pastebin: Accept HTTPS URLs
This will let us switch the URLs the pastebin returns to HTTPS some
day...
2016-09-05 22:06:26 +02:00
Florian Bruhin
0ad8578aa8 Make QtWebKit optional in earlyinit.py 2016-09-05 17:58:29 +02:00
Florian Bruhin
cf070d48f2 WebEngine: Disable createWindow for Qt < 5.7.1
Fixes #1911.

The bugfix is backported in my qt5-webengine-debug package, and
QUTE_QTBUG54419_PATCHED can be set to force qutebrowser to use
createWindow.
2016-09-05 15:08:00 +02:00
Florian Bruhin
1cdf90f1c7 pastebin: Start sending API key
This is not enforced on the server yet, but this way we can do so after
a few releases (and break crash reports for older releases).
2016-09-01 22:57:35 +02:00
rmortens
384e3d1d88 Add change format for debug-log-level cmd 2016-08-24 08:40:11 -06:00
Florian Bruhin
bcb06f0cc6 Fix lint 2016-08-19 15:47:35 +02:00
Florian Bruhin
e074192cc4 Update docs 2016-08-19 15:27:56 +02:00
Florian Bruhin
7e3d1ccd24 Simplify :debug-log-filter implementation 2016-08-19 15:08:15 +02:00
Florian Bruhin
e1cd905163 Move :window-only below :debug-log-* in utilcmds 2016-08-19 15:06:08 +02:00
Florian Bruhin
71b0876188 Improve :debug-log-filter message
This changes the message so it resembles the default choices=... one,
and also changes the argument to "filters" because that sounds nicer as
a metavar.
2016-08-19 15:03:19 +02:00
Florian Bruhin
75c3b1a9f8 Fix test for :debug-log-level with invalid level
Since we're getting dictionary keys in choices=..., we need to sort them
so we get a consistent message.
2016-08-19 14:57:21 +02:00
knaggita
1d5a3a6175 Add :debug-loglevel :debug-logfilter commands 2016-08-19 14:12:19 +02:00
Florian Bruhin
882d1a5e88 Move :window-only to misc.utilcmds 2016-08-16 11:05:02 +02:00
Florian Bruhin
57896dc00e Merge branch 'clip' of https://github.com/blyxxyz/qutebrowser into blyxxyz-clip 2016-08-10 20:38:54 +02:00
Jan Verbeek
63b9b61e75 Add ClipboardError superexception 2016-08-10 12:33:01 +02:00
Florian Bruhin
a24391d40d Fix lint 2016-08-10 09:20:30 +02:00
Florian Bruhin
26af2b3089 Fix grammar mistake 2016-08-10 08:48:04 +02:00
Florian Bruhin
dfd58d456a Merge branch 'pythonoptimize-fix' of https://github.com/lejenome/qutebrowser into lejenome-pythonoptimize-fix 2016-08-10 08:47:34 +02:00
Florian Bruhin
fb3da578c5 Fix lint 2016-08-09 17:28:14 +02:00
Moez Bouhlel
c04adb94b2
DocstringParser - support python with optimizations on 2016-08-08 10:01:50 +01:00
Jan Verbeek
ebfe23c376 Merge https://github.com/The-Compiler/qutebrowser into clip
Also make it possible to use multiple variables in one argument.
2016-08-07 13:14:46 +02:00
Florian Bruhin
b6fbd3ce3a Merge branch 'better-variables' of https://github.com/blyxxyz/qutebrowser into blyxxyz-better-variables 2016-08-07 11:33:01 +02:00
Jan Verbeek
38508274e0 Improve clipboard exceptions, migrate bindings 2016-08-07 00:46:23 +02:00
Daniel Schadt
9a4655443f os.unlink -> os.remove
The functions do the same, but remove sounds better.
2016-08-07 00:11:58 +02:00
Daniel Schadt
f23a28079c editor: fix external editor on windows
On windows, only one process can open a file in write mode at once. We
didn't close the handle we got (self._oshandle) before _cleanup, which
means that we had the file open the whole time, which means that the
external editor couldn't write back the changes.

This patch closes the file while the external editor is running and only
opens it once the editor is closed. We re-opened the file anyway, so
this shouldn't be a huge change. Additionally, tempfile.NamedTemporaryFile
is used instead of mkstemp, as we don't have to deal with os-level file
handles that way.
2016-08-06 20:04:25 +02:00
knaggita
d25e1fde04 Add :debug-log-capacity command 2016-08-05 15:05:27 +02:00
Florian Bruhin
029ea2e5a7 Add miscwidgets.WrapperLayout.wrap
This makes it easier for an user of WrapperLayout to wrap a widget.
2016-08-04 19:22:44 +02:00
Jan Verbeek
c7c5a98506 Allow {url} and {url:pretty} as parts of arguments
This makes commands like `:open web.archive.org/web/{url}` possible.
This commit also adds a no_replace_variables command register argument
that stops the replacement from happening, which is important for
commands like `:bind` and `:spawn` that take a command as an argument.
2016-08-04 02:43:02 +02:00
Florian Bruhin
dbccb12b49 Move WrapperLayout to miscwidgets 2016-08-03 13:08:25 +02:00
Ryan Roden-Corrent
a086095954 Implement unix_filename_rubout.
unix_filename_rubout deletes to the previous slash or whitespace,
unlike the previously implemented backwards-kill-word which treats and
non-alphanumeric character as a boundary.

To illustrate, given the text 'foo/bar.baz', unix_filename_rubout will
delete 'bar.baz' while backwards-kill-word will delete only 'baz'.

See #1710.
2016-07-30 19:34:38 -04:00
Ryan Roden-Corrent
6bcdacf1ce Implement readline's backward-kill-word.
This restores the previous behavior of `unix-word-rubout` as
`backward-kill-word`, which is closer to the naming used in readline.
It is bound to <Alt-Backspace> by default, though <Ctrl-Backspace> will
also work due to a builtin binding.

Resolves #1698.
2016-07-30 07:27:29 -04:00
Florian Bruhin
caab826e8a Use repr() for IPC logging messages 2016-07-28 07:14:54 +02:00
Florian Bruhin
0eb74dcc1b Hide harfbuzz warning if frozen 2016-07-27 12:15:10 +02:00
Florian Bruhin
7b82d81784 Improve error message on OS X without QtWebEngine 2016-07-27 12:13:22 +02:00
Florian Bruhin
3ccb691e9f tab API: Rename scroll to scroller
The scroll attribute did overwrite QWidget.scroll which is unfortunate.
2016-07-26 13:19:07 +02:00
Florian Bruhin
e887d9a381 Remove useless super-calls 2016-07-23 18:39:27 +02:00
Jean-Louis Fuchs
ef01566621 Initialize qt logging to qutebrowser as early as possible 2016-07-23 09:54:13 +00:00
Florian Bruhin
63e466f019 Remove @pyqtSlot for some non-QObject classes
Not sure if I got all, but at least I got the ones which fail
immediately on start.

See #1669.
2016-07-21 14:56:12 +02:00
Florian Bruhin
d867a789c2 Re-enable crash reports for QtWebEngine 2016-07-17 14:27:01 +02:00
Florian Bruhin
ff89ae7839 Merge branch 'master' of https://github.com/blyxxyz/qutebrowser into blyxxyz-master 2016-07-13 21:21:37 +02:00
Jan Verbeek
bbc46d28ff Use lists instead of tuples for comparing
Per one of the diff comments on #1597:
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
2016-07-12 22:05:32 +02:00
Jan Verbeek
cafe7181c7 Blacklist command-accept, hide repeat-command
prompt-accept was blacklisted instead of command-accept.
2016-07-12 16:48:33 +02:00
Florian Bruhin
d315a3131d Require QtWebEngine with --backend webengine 2016-07-11 22:51:05 +02:00
Florian Bruhin
7e36884cbd Add some debug logging to early QWEW import
See #1640
2016-07-11 13:49:24 +02:00
Florian Bruhin
6a07d231f4 pykint: Add some disable=unused-variable 2016-07-11 13:18:31 +02:00
Florian Bruhin
b4f993e2ab Add an early-import for QtWebEngineWidgets 2016-07-11 09:18:05 +02:00
Florian Bruhin
2befebaf3a Don't use properties for AbstractTab
Otherwise exceptions in there could be hidden by Python/PyQt.

Some places are not changed yet, as there are also other renames in the
next commits.
2016-07-08 10:05:46 +02:00
Florian Bruhin
0207f8758b Only disable reports with --backend webengine 2016-07-07 18:32:52 +02:00
Florian Bruhin
e1bad17f2a Split up SessionManager._save_tab_item 2016-07-07 18:32:52 +02:00
Florian Bruhin
f72f82fb0c QtWebEngine: Fix userData() call on session saving 2016-07-07 18:32:52 +02:00
Florian Bruhin
4de48620e3 Fix loading of sessions 2016-07-07 18:32:52 +02:00
Florian Bruhin
9f130c6b27 Disable crash reports 2016-07-07 18:32:52 +02:00
Florian Bruhin
16c397a9d2 Fix various zooming issues 2016-07-07 18:32:52 +02:00
Florian Bruhin
34d3d2cda6 Full scrolling implementation 2016-07-07 18:32:52 +02:00
Florian Bruhin
363f3d7ea7 Replace scroll_pos by scroll_pos_px()/_perc() 2016-07-07 18:32:52 +02:00
Florian Bruhin
ed716b2b90 Make session saving work 2016-07-07 18:32:52 +02:00
Florian Bruhin
70117265d6 Fix some a/an misspellings
Thanks to https://github.com/jwilk/anorack
2016-07-05 08:34:03 +02:00
Jan Verbeek
955478799b Shorten repeat-command description, remove .i, .o
If .i and .o exist there's a delay before . gets accepted.
2016-07-04 13:39:00 +02:00
Jan Verbeek
9678fd1e09 Make argument description more clear + style fix 2016-07-01 19:17:50 +02:00
Jan Verbeek
2ab1d35a7c Remove useless import and global declaration, add missing whitespace 2016-06-30 03:13:40 +02:00
Jan Verbeek
320b9cac3f Move repeat-command, make it work with multiple modes, improve tests 2016-06-30 02:22:02 +02:00
Edgar Hipp
bfeba3cee6 Update readline.py 2016-06-22 17:15:03 +02:00
Edgar Hipp
9e1c7e0117 Update readline.py 2016-06-22 16:30:38 +02:00