Commit Graph

616 Commits

Author SHA1 Message Date
Florian Bruhin
2b2331754d Combine launch/crash time into one section. 2016-02-17 07:10:01 +01:00
Florian Bruhin
36019c0cab Split long lines. 2016-02-17 07:04:25 +01:00
avk
d551591b42 Added crash time to crash report 2016-02-12 11:59:45 +01:00
Florian Bruhin
b6f1dd963d Handle Shift-Insert correctly in prompt mode.
Fixes #1299.
2016-02-10 06:40:54 +01:00
Florian Bruhin
79f83a033d Add a fake clipboard for tests
There are a lot of problems and flakiness with using a real clipboard.

Instead we now have a :debug-set-fake-clipboard command to set a text, and use
logging when getting the contents.

Fixes #1285.
2016-02-03 20:27:11 +01:00
Oliver Caldwell
4cd7d193f1 Simplify arg placeholder replacement 2016-01-31 22:56:11 +00:00
Oliver Caldwell
e9128ebb2a Relax editor templating
I tried to set my editor to `termite -e "vim -f {}"`, termite being a
pretty cool and light terminal I use within my i3wm Arch linux box.

So when I open my editor I want it to launch a terminal with Vim inside
instead of GVim for various reasons.

The validation rejected this at first because it was looking for '{}'
inside ['foo', 'bar', 'baz {}'], essentially. So I need it to look
inside the sub-strings, not just the list.

Then after validation I need to perform the '{}' replacement inside the
sub-string too, not just replacing the whole string.
2016-01-26 09:18:43 +00:00
Tomasz Kramkowski
6894033f8d lineparser: Add clear() method.
The lineparser clear method, implemented for all lineparser subclasses,
clears the underlying file and also empties any lineparser data
structures.
2016-01-23 22:35:19 +00:00
Florian Bruhin
7fa0dc68bf flake8: Add flake8-pep3101 plugin.
Checks for old string formatting.
https://pypi.python.org/pypi/flake8-pep3101/
2016-01-22 19:40:10 +01:00
Florian Bruhin
f74d1f26c7 flake8: Add flake8-string-format plugin.
string format checker, plugin for flake8
https://pypi.python.org/pypi/flake8-string-format/
2016-01-22 19:00:29 +01:00
Florian Bruhin
8bdb1b6b14 flake8: Add flake8-copyright plugin.
Adds copyright checks to flake8
https://pypi.python.org/pypi/flake8-copyright/
2016-01-22 17:46:33 +01:00
Florian Bruhin
58fb2826ee flake8: Add flake8-putty plugin.
Apply a bit of putty to flake8.
https://pypi.python.org/pypi/flake8-putty/
2016-01-22 17:33:58 +01:00
Florian Bruhin
7e3507aba1 flake8: Add flake8-debugger plugin.
flake8 debug statement checker
https://github.com/JBKahn/flake8-debugger
2016-01-22 17:33:58 +01:00
Florian Bruhin
526441bcae Fix new flake8 lint.
For some reason these issues weren't shown with pytest-pep8/flakes.
2016-01-22 17:33:58 +01:00
Florian Bruhin
364d069e74 Stop IPC timeout timer while executing command.
This hopefully helps with #1183.
2016-01-08 13:48:19 +01:00
Florian Bruhin
d84b15d35c ipc: Add missing 0x prefix for logged socket IDs. 2016-01-08 13:09:49 +01:00
Florian Bruhin
ff2024a565 Add socket IDs to ipc debug messages. 2016-01-08 12:02:36 +01:00
Florian Bruhin
c7edb8e1f2 Make QApplication available to :debug-pyeval. 2016-01-06 07:14:49 +01:00
Florian Bruhin
05281a7d1f Add a --quiet argument to :debug-pyeval.
Closes #1156.
2016-01-06 06:19:37 +01:00
Florian Bruhin
129990857a Point out crash reports are currently public.
See #481.
2016-01-05 07:07:45 +01:00
Florian Bruhin
7001f068b3 Restart correctly after reporting crash.
Fixes #1128.
2016-01-05 07:02:20 +01:00
Florian Bruhin
a5f2ac5f03 Adjust copyright years. 2016-01-04 07:12:39 +01:00
Florian Bruhin
5c769d8000 Report stdout/stderr of failed subprocesses. 2015-12-18 21:23:33 +01:00
Florian Bruhin
eff0e4c7cc pylint: Enable useless-suppression globally.
We deactivate it locally where needed, i.e. where we are sure it's some
platform-specific thing.
2015-12-01 23:01:09 +01:00
Florian Bruhin
150a83d8f4 pylint: Remove unneeded supressions. 2015-12-01 22:03:58 +01:00
Tomasz Kramkowski
c575435782 misc/editor: Fix tempfile deleted on error / editor crash
This patch attempts to fix an issue where an error occuring in
misc/guiprocess or the editor process crashing would delete the
temporary file thus making it impossible to recover changes not commited
to the form field from the editor.
2015-12-01 20:22:05 +00:00
Florian Bruhin
6f9b02741a Switch from map() to list comprehensions. 2015-12-01 07:16:32 +01:00
Florian Bruhin
e26c499bd6 lineparser: Log after saving is done.
This will make end to end tests easier as we can easily wait until saving is
done.
2015-11-28 23:35:04 +01:00
Florian Bruhin
8cf6ace0e7 Ignore deleted windows when saving session.
This hopefully helps with a crash on Windows which happens from time to time
during some multi-window tabs.feature tests:

Traceback (most recent call last):
  File "...\mainwindow\mainwindow.py", line 446, in closeEvent
    self._do_close()
  File "...\mainwindow\mainwindow.py", line 405, in _do_close
    objreg.get('session-manager').save_last_window_session()
  File "...\misc\sessions.py", line 247, in save_last_window_session
    self._last_window_session = self._save_all()
  File "...\misc\sessions.py", line 183, in _save_all
    win_data['geometry'] = bytes(main_window.saveGeometry())
RuntimeError: wrapped C/C++ object of type MainWindow has been deleted
2015-11-28 20:30:41 +01:00
Florian Bruhin
8faf4717e5 Make :debug-console toggle the console. 2015-11-24 18:32:18 +01:00
Florian Bruhin
c7f386cec0 Avoid logging in signal handlers.
If we don't do that, we can get this:

--- Logging error ---
Traceback (most recent call last):
  File ".../python3.5/logging/__init__.py", line 984, in emit
    self.flush()
  File ".../python3.5/logging/__init__.py", line 964, in flush
    self.stream.flush()
RuntimeError: reentrant call inside <_io.BufferedWriter name='<stderr>'>
Call stack:
  [...]
  File ".../qutebrowser/app.py", line 122, in qt_mainloop
    return qApp.exec_()
  File ".../qutebrowser/utils/objreg.py", line 118, in on_destroyed
    log.destroy.debug("schedule removal: {}".format(name))
  File ".../python3.5/logging/__init__.py", line 1267, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File ".../python3.5/logging/__init__.py", line 1415, in _log
    self.handle(record)
  File ".../python3.5/logging/__init__.py", line 1425, in handle
    self.callHandlers(record)
  File ".../python3.5/logging/__init__.py", line 1487, in callHandlers
    hdlr.handle(record)
  File ".../python3.5/logging/__init__.py", line 855, in handle
    self.emit(record)
  File ".../python3.5/logging/__init__.py", line 984, in emit
    self.flush()
  File ".../python3.5/logging/__init__.py", line 964, in flush
    self.stream.flush()
  File ".../qutebrowser/misc/crashsignal.py", line 365, in interrupt
    log.destroy.info("Do the same again to forcefully quit.")
Message: 'Do the same again to forcefully quit.'
Arguments: ()
2015-11-18 20:21:23 +01:00
Florian Bruhin
374b448e51 Get rid of unnecessary file.readline() calls. 2015-11-10 18:44:42 +01:00
Florian Bruhin
4451165a27 Change IPC warnings to debug.
This seems to show up on Ubuntu Trusty (with older Qt) as well...
2015-11-01 23:11:42 +01:00
Florian Bruhin
c2ea2aa6d7 Remove unused import. 2015-10-07 22:05:22 +02:00
Florian Bruhin
7db1f65425 ipc: Avoid using QLocalServer.setSocketOptions.
This causes problems with AddressInUseError being swallowed.

Fixes #997.
2015-10-07 21:52:09 +02:00
Jonas Schürmann
afc166a13e Coding style fixes #1002 2015-10-06 22:59:49 +02:00
Jonas Schürmann
45c9768c16 Added --target command line argument #922
This argument is used to override the new-instance-open-target config
option.
2015-10-05 21:15:52 +02:00
Florian Bruhin
d229e90724 Fix some splelling mistakes. 2015-10-04 15:41:42 +02:00
Florian Bruhin
b42b12b7a5 Fix ipc.py coverage. 2015-10-02 08:17:50 +02:00
Florian Bruhin
454b2348a8 ipc: Actually use CONNECT_TIMEOUT. 2015-10-02 08:11:37 +02:00
Florian Bruhin
ea663f9975 IPC: Handle socket timeout correctly.
Hopefully fixes #975.
2015-10-02 08:11:26 +02:00
Florian Bruhin
8e52e5f2fc Don't use deprecated logging calls. 2015-10-01 21:39:42 +02:00
Alexey Nabrodov
54d4f4f48b refactor and test 2015-10-01 15:57:11 +03:00
Alexey Nabrodov
be332fe723 init env vars in crash report 2015-10-01 14:11:35 +03:00
Florian Bruhin
9ab14c0384 Fix IPC coverage. 2015-09-16 07:16:07 +02:00
Florian Bruhin
73cb981ebb Add some more IPC logging. 2015-09-15 23:05:50 +02:00
Florian Bruhin
ff24ba5437 ipc: Fix atime timer interval. 2015-09-15 22:59:53 +02:00
Florian Bruhin
3bdfa3001c ipc: Always use standarddir.runtime(). 2015-09-15 22:31:37 +02:00
Florian Bruhin
c4c06467da Add missing pyqtSlot decorator. 2015-09-11 08:32:37 +02:00
Florian Bruhin
d15cc07ed3 Log executed command for GUIProcess.
See #797.
2015-09-11 06:24:05 +02:00
Florian Bruhin
087e9a4266 Fix ipc on Windows, take 2. 2015-09-10 08:04:02 +02:00
Florian Bruhin
87ccc31cce ipc: Add some more tests for _atime_timer. 2015-09-10 08:02:19 +02:00
Florian Bruhin
1dba5b0bbd ipc: Fix _atime_timer shutdown on Windows. 2015-09-10 07:52:26 +02:00
Florian Bruhin
d2bce5dca9 ipc tests: Try to disconnect _atime_timer.
For some reason this fails during teardown on OS X!?

    File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/misc/ipc.py", line 357, in update_atime
      path = self._server.fullServerName()
    File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/mock.py", line 895, in __call__
      _mock_self._mock_check_sig(*args, **kwargs)
    File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/mock.py", line 107, in checksig
      sig.bind(*args, **kwargs)
    File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 2652, in bind
      return args[0]._bind(args[1:], kwargs)
    File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 2537, in _bind
      param = next(parameters)
    File "/Users/buildbot/buildbot/slave/osx/build/.tox/py34/bin/../lib/python3.4/_collections_abc.py", line 512, in __iter__
      for key in self._mapping:
    File "/Users/buildbot/buildbot/slave/osx/build/.tox/py34/lib/python3.4/collections/__init__.py", line 91, in __iter__
      curr = root.next
2015-09-10 07:49:45 +02:00
Florian Bruhin
e6cf76e40c Fix coverage and lint. 2015-09-10 07:44:45 +02:00
Florian Bruhin
58073fd768 ipc: Update the atime of the socket all 6h.
See #888.
2015-09-10 07:38:11 +02:00
Florian Bruhin
2ca8070e7a Add workaround for OS X issue. 2015-09-09 20:48:23 +02:00
Florian Bruhin
f7d3070c34 ipc: Fix start when a stale legacy server exists. 2015-09-09 19:39:01 +02:00
Florian Bruhin
b135569d5c ipc: Add workaround for NameError w/ SocketOptions. 2015-09-09 19:31:52 +02:00
Florian Bruhin
69e735c42e ipc: Add username to hash instead. 2015-09-09 19:31:52 +02:00
Florian Bruhin
4daa7e6979 Don't add username to FIFO name on Linux.
The runtime directory already has a qutebrowser subdir.
2015-09-09 19:31:52 +02:00
Florian Bruhin
3573b57130 Set socket permissions correctly. 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
44b1ca5c2f Fix comment. 2015-09-09 19:31:52 +02:00
Florian Bruhin
d18c33987d Quick pep8 fix.
This is already fixed in the new-ipc-path branch, but let's at least get this
straight in master.
2015-09-09 08:06:56 +02:00
Florian Bruhin
6a0994038e Start working on #888 (new IPC path). 2015-09-06 19:50:22 +02:00
Florian Bruhin
bfd8faafef Add a protocol version to IPC.
Fixes #909.
2015-09-06 18:43:24 +02:00
Florian Bruhin
b95fd2c814 Test raw json data for IPC. 2015-09-06 18:06:23 +02:00
Florian Bruhin
e9608a6aea Add qutebrowser version to IPC data.
See #909.
2015-09-06 18:06:03 +02:00
Florian Bruhin
9b1d0af20d ipc: Simplify exception handling. 2015-09-04 07:16:16 +02:00
Florian Bruhin
ea0cbea1dd ipc: Use a custom class for exceptions. 2015-09-04 07:12:23 +02:00
Florian Bruhin
2a4cd02704 100% coverage for misc.ipc. 2015-09-04 06:58:46 +02:00
Florian Bruhin
0d0e704b6b ipc: Reduce logging on Windows.
Otherwise the tests fail there...
2015-09-03 23:33:41 +02:00
Florian Bruhin
fab6e2eafc ipc: Fix exception handling on AddressError. 2015-09-03 23:13:55 +02:00
Florian Bruhin
a6b9d28b96 ipc: Fix sleep time on AddressError. 2015-09-03 23:13:29 +02:00
Florian Bruhin
b40fb4dd43 ipc: Handle None-socket in slots correctly. 2015-09-03 20:48:51 +02:00
Florian Bruhin
3a5cd8f3ff Revert "Remove test_ipc workaround again."
This reverts commit f4d2e0746e.
2015-09-03 06:51:15 +02:00
Florian Bruhin
f4d2e0746e Remove test_ipc workaround again. 2015-09-03 06:36:33 +02:00
Florian Bruhin
efe40fa7e0 Try different workaround for test_ipc issues. 2015-09-03 06:12:36 +02:00
Florian Bruhin
e0c6a322c6 ipc: Pass socket to send_to_running_instance. 2015-09-02 23:32:06 +02:00
Florian Bruhin
82c647a87d ipc: Mark on_ready_read cornercase as no-cover. 2015-09-02 23:32:06 +02:00
Florian Bruhin
1953bb8458 ipc: Disconnect on invalid data. 2015-09-02 23:32:06 +02:00
Florian Bruhin
6b4b65e585 ipc: Clarify comment. 2015-09-02 23:32:06 +02:00
Florian Bruhin
cbcd6261b1 ipc: Add got_invalid_data signal. 2015-09-02 23:32:06 +02:00
Florian Bruhin
0c3ee46fe0 Merge branch 'autoupdate_tests' of https://github.com/acogneau/qutebrowser into acogneau-autoupdate_tests 2015-09-01 08:48:52 +02:00
Alexander Cogneau
e499d8932f 100% misc.autoupdate coverage 2015-08-31 01:10:04 +02:00
Florian Bruhin
8913c1883e ipc: Fix missing import. 2015-08-30 22:57:45 +02:00
Florian Bruhin
6dbd669efe ipc: Disconnect properly from server. 2015-08-30 20:35:50 +02:00
Florian Bruhin
a1cb47936a IPC: Fix shutdown when self._socket is None. 2015-08-30 20:35:34 +02:00
Florian Bruhin
39e40a7887 ipc: Pass args to send_to_running_instance. 2015-08-29 23:09:44 +02:00
Florian Bruhin
fe493f8565 ipc: Pass socket name to IPCServer. 2015-08-29 21:26:22 +02:00
Florian Bruhin
d5668dd687 ipc: Don't listen in IPCServer.__init__ already. 2015-08-27 23:09:25 +02:00
Florian Bruhin
a7bf0744e0 Move some IPC code from app.py to ipc.py. 2015-08-27 23:04:27 +02:00
Florian Bruhin
ff6e96347b ipc: Refactor _get_socketname to take better args. 2015-08-27 22:32:29 +02:00
Florian Bruhin
1a062035eb Log IPC server name to debug log. 2015-08-24 19:28:09 +02:00
Florian Bruhin
201f2f67d3 sessions: Logging/error message improvements. 2015-08-24 17:12:20 +02:00
Florian Bruhin
b783069f48 SessionManager: Factor out name handling in save. 2015-08-23 21:54:55 +02:00
Florian Bruhin
2556e2e27b Remove unused import. 2015-08-23 18:29:02 +02:00
Florian Bruhin
17215822bc sessions: Use try/except to create base-path. 2015-08-23 18:17:10 +02:00
Florian Bruhin
3d5599facb Move session dir handling out of SessionManager. 2015-08-22 22:53:03 +02:00
Florian Bruhin
685bbaae6d 100% test coverage for misc.editor. 2015-08-19 09:34:44 +02:00
Florian Bruhin
07c6c40548 Set messagebox = None without Tk in checkpyver. 2015-08-19 06:39:22 +02:00
Florian Bruhin
1a61e53daa 100% test coverage for misc.checkpyver. 2015-08-19 05:58:52 +02:00
Florian Bruhin
e4a0f1972f tests: Improve MessageMock and use it. 2015-08-18 21:38:18 +02:00
Florian Bruhin
3a85afe1f4 Use datetime.ctime(). 2015-08-07 22:32:02 +02:00
Alexander Cogneau
43e0ac1844 Fix PEP8: line too long warning 2015-08-07 21:15:40 +02:00
Alexander Cogneau
73c28c12f3 Show launch time in crash logs. 2015-08-07 20:36:38 +02:00
Florian Bruhin
61df5fcd7a Skip confirm-quit checks when crashing.
Fixes #853.
2015-08-06 21:08:20 +02:00
Florian Bruhin
c13f7e5f78 Remove dead ShellLexer code. 2015-08-02 13:05:19 +02:00
Florian Bruhin
dc4d4e70e4 Make sure state is valid in ShellLexer. 2015-08-02 12:44:54 +02:00
Florian Bruhin
b3869fe42b sessions: Store zoom/scroll-pos per history entry.
Also fixes #728.
2015-06-27 18:06:18 +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
f17131f6c2 Change Qt links to point to qt.io. 2015-06-12 16:59:33 +02:00
Florian Bruhin
33ad0ab1fc Fix startDetached return value for GUIProcess. 2015-06-11 23:02:47 +02:00
Florian Bruhin
8a87b5d357 Rename GUIProcess.started to _started.
It's unneeded for this to be public, and it conflicts with the pyqtSignal.
2015-06-11 20:30:37 +02:00
Florian Bruhin
ad401e035f Proxy QProcess signals. 2015-06-11 20:30:37 +02:00
Florian Bruhin
62d2018695 Add cmd/args/started to GUIProcess. 2015-06-11 20:30:28 +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
b57027f800 Fix pylint warnings on Windows. 2015-06-10 18:35:33 +02:00
Florian Bruhin
a82b0d007d Enforce a Qt with SSL support. 2015-06-07 10:47:28 +02:00
Florian Bruhin
36803cba06 Switch from flake8 to pytest-{mccabe,flakes,pep8}. 2015-06-02 20:51:06 +02:00
Florian Bruhin
d8e58b5886 Fix some typos. 2015-06-01 22:45:40 +02:00
Martin Tournoij
d20872d576 Fix feedback from #690 2015-05-29 14:50:15 +02:00
Martin Tournoij
c76221c14e Use a specific 'qutebrowser_editor_' prefix for <C-e> instead of 'tmp'.
Why does this matter? In my vimrc I have this:

	" When using dwb <C-e>; assume markdown, and don't store in viminfo since these are
	" temporary files
	autocmd BufRead,BufNewFile /home/martin/.cache/dwb/edit* setlocal ft=markdown viminfo=

I would like to do the same with qutebrowser, but this is not possible with a
file name like '/tmp/tmpSJsgSG4'
2015-05-29 02:07:20 +02:00
Florian Bruhin
f6ad556f34 Get rid of --no-crash-dialog. 2015-05-17 01:03:34 +02:00
Florian Bruhin
315725a3ac Print info with --no-err-windows on earlyinit errs. 2015-05-17 00:48:15 +02:00
Florian Bruhin
002346a125 Clean up exception_hook. 2015-05-17 00:44:04 +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
d7999577dd Fix shutdown from pdb. 2015-05-16 23:13:36 +02:00
Florian Bruhin
54131e9d3e Add --basedir arg with multiple instance support.
Closes #510.
2015-05-16 23:10:20 +02:00
Florian Bruhin
183049ef2e Make sure self._opened is reset on exceptions. 2015-05-16 22:48:13 +02:00
Florian Bruhin
c762340a0c Add --datadir/--cachedir arguments. Closes #136. 2015-05-16 22:12:27 +02:00
Florian Bruhin
c236046a73 Avoid double-opening LineParser.
Hopefully helps with diagnosing #670.
2015-05-14 15:11:16 +02:00
Florian Bruhin
3b5b49daac Move quitter/signal/crash_handler out of qApp. 2015-05-07 09:23:34 +02:00
Florian Bruhin
8aec5244de Fix crash restart. 2015-05-06 07:11:14 +02:00
Florian Bruhin
f499fd85d0 Fix IPC. 2015-05-01 14:46:17 +02:00
Florian Bruhin
d3a7b2e4ca Big refactoring of app.py. 2015-04-30 07:37:25 +02:00
Florian Bruhin
4925091ede Merge branch 'master' of github.com:The-Compiler/qutebrowser 2015-04-22 07:43:01 +02:00
Florian Bruhin
7439586334 Move special params to cmdutils.register decorator
See #637.
2015-04-20 19:33:05 +02:00
Florian Bruhin
0195cb31bb Don't set scope in cmdutils.register w/o instance. 2015-04-20 18:55:22 +02:00
Florian Bruhin
94d49b4801 Add :message-{info,error,warning} commands. 2015-04-20 18:32:15 +02:00
Florian Bruhin
43df32949d Refactor IPC exceptions handling.
Also fixes an IPC error when qutebrowser was started twice without delay
between the invocations.
2015-04-17 19:24:27 +02:00
Florian Bruhin
987bab9960 Merge pull request #19 from hackebrot/parametrize-sub-tests
Parametrize sub tests
2015-04-14 07:01:53 +02:00
Florian Bruhin
b609f993c3 Add a timeout to HTTPClient.
Fixes #629.
2015-04-13 20:59:05 +02:00
Florian Bruhin
9381aac501 Merge {Pastebin,PyPIVersion}Client into HTTPClient. 2015-04-13 20:42:28 +02:00
Florian Bruhin
c071bcbec8 Clean up loggers. 2015-04-13 08:49:04 +02:00
Florian Bruhin
f85ba8645f Handle a missing session folder at some places. 2015-04-13 08:38:12 +02:00
Florian Bruhin
f865b87a74 Show a message and update notifier on reports.
Fixes #340.
Fixes #447.
See #429.
2015-04-10 08:09:18 +02:00
Bruno Oliveira
29c51c288b Fix small typo in docstring 2015-04-09 18:47:25 -03:00
Florian Bruhin
20f0ef7ccc Ignore ;; for splitting with some commands.
Fixes #405.
2015-04-06 17:00:52 +02:00
Florian Bruhin
d83da987ae Move SessionManager init to sessions.py. 2015-04-05 23:44:25 +02:00
Florian Bruhin
9b8f5e3ff0 Make the default session name configurable.
See #523.
2015-04-05 23:30:43 +02:00
Florian Bruhin
8bbff689b4 Add a -t/--temp flag to :session-load.
See #523.
2015-04-05 16:06:41 +02:00
Florian Bruhin
17ebbc37c5 Add a -c/--current parameter to :session-save.
See #523.
2015-04-05 16:04:03 +02:00
Florian Bruhin
ac63fc073f save: Add possibility to mark things dirty on add.
KeyConfig needs this feature, because it can fix some deprecated commands
during __init__ and emit its dirty-signal, but that happens before the saveable
is added.
2015-04-03 19:07:29 +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
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
6e435ad215 Add state config sections when initializing. 2015-04-01 18:26:45 +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
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
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
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
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
e8e6d8409b Adjust pylint exceptions. 2015-03-11 20:14:39 +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
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
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
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
0f9a1fe178 Display ImportError messages in earlyinit errors. 2015-02-23 15:16:30 +01:00
Florian Bruhin
c5a2039da4 Refactor QStandardPaths handling. 2015-02-22 19:13:51 +01:00
Florian Bruhin
14f2420500 Fix wrong parsing of faulthandler logs. 2015-02-19 22:45:37 +01:00
Florian Bruhin
2d4b03fbc9 Improve parsing of faulthandler logs. 2015-02-19 21:38:02 +01:00
Florian Bruhin
5b33f6c5fe Re-add save-session setting. 2015-02-17 07:45:06 +01:00
Florian Bruhin
56b0ae2b6e Get rid of mainwindow.MainWindow.spawn. 2015-02-16 22:56:12 +01:00
Florian Bruhin
46ca0e447e Get rid of the save-session setting for now.
With the way quitting is handled currently, it's hard to save the session on
quit as the windows will already be closed.
2015-02-16 21:33:24 +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
1cf34e7984 Force saving the config if new options were added. 2015-02-13 23:53:56 +01:00
Florian Bruhin
c2f9cae770 Don't show line edit text in its repr().
Previously we showed self.text in the __repr__ of MinimalLineEdit. This however
is a bad idea, because it exposes passwords to the debug log when the currently
focused widget is logged.
2015-02-11 23:33:31 +01:00
Florian Bruhin
31e71ed6d9 Fix copyright years.
Files created in 2015 don't need to have 2014 as copyright year.
2015-02-06 00:21:57 +01:00
Florian Bruhin
7615e20091 Add -s argument to set temporary options. 2015-02-05 07:54:19 +01:00
Florian Bruhin
5ed592a447 Replace some QTimers by named Timers. 2015-02-05 07:17:58 +01:00
Florian Bruhin
9b1729c77e Always write config files to disk on first start. 2015-02-01 23:47:40 +01:00
Florian Bruhin
1c919967bb Send history (optionally) in fatal crash dialog. 2015-02-01 23:12:46 +01:00
Florian Bruhin
2f01c7c3ae Minor style adjustments in crashdialog.py. 2015-02-01 23:12:32 +01:00
Florian Bruhin
1266f147c8 Auto-save state/config/... periodically.
See #15.
2015-02-01 01:38:16 +01:00
Florian Bruhin
822bf90b26 Fix another speeling mistake. 2015-02-01 01:22:46 +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
41fd89a206 crashdialog: Shorten paste titles.
Unfortunately the maximum char count for paste titles is 32...
2015-01-25 22:14:55 +01:00
Florian Bruhin
323db55a9c Remove restore checkbox from fatal report dialog. 2015-01-25 21:46:48 +01:00
Florian Bruhin
bd0a3a86d9 Display error on qt_mainloop crashes with old Qt.
See #447.
2015-01-25 21:37:28 +01:00
Florian Bruhin
09ea733231 Use qVersion() instead of QT_VERSION_STR. 2015-01-25 21:12:50 +01:00
Florian Bruhin
9702433d4e Crash dialog redesign.
We now have "Report/Don't report" buttons and a restart checkbox (checked by
default), so users don't accidentally send reports when they don't want to.
2015-01-24 20:28:44 +01:00
Florian Bruhin
5b3b324331 Produce better titles for crash logs.
See #483 and #447.
2015-01-24 14:48:16 +01:00
Florian Bruhin
b387b4c7a9 Merge branch 'master' of ssh://git/qutebrowser 2015-01-22 10:41:58 +01:00
Thorsten Wißmann
5d5e26eb7b Fix some check_libraries() for arch
By now, the python-jinja and python-pygments packages are available in
community.
2015-01-22 07:01:35 +01:00
Florian Bruhin
3b6a504d7b crashdialog: Move contact info to top.
See #447.
2015-01-22 06:58:37 +01:00
Florian Bruhin
aa3017dd58 crashdialog: Reword contact info text.
See #447.
2015-01-22 06:56:45 +01:00
Florian Bruhin
50557a9b3e crashdialog: Remove Github from contact types.
See #447.
2015-01-22 06:56:23 +01:00
Florian Bruhin
c98bfa9a9d Move version info more to the top in logs. 2015-01-16 09:22:22 +01:00
Florian Bruhin
dbd0d1fff9 Save report dialog contact infomation. 2015-01-16 07:36:38 +01:00
Florian Bruhin
ff0c845c50 Uncheck sending of debug log with private browsing.
Fixes #436.
2015-01-04 20:41:35 +01:00
Florian Bruhin
450d1ab70d Update copyright years 2015-01-03 15:51:31 +01:00
Florian Bruhin
bf4d6a5707 Handle an invalid cwd properly.
Fixes #370.
2014-12-26 15:07:18 +01:00
Florian Bruhin
7c86693dd4 Disable report button in crash dialog on :report. 2014-12-26 13:03:47 +01:00
Florian Bruhin
0c6af7a5f3 Move debug log to bottom in crash dialog.
Closes #365.
2014-12-26 13:01:19 +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