1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
Commit Graph

177 Commits

Author SHA1 Message Date
sudden6
d746ea9daf
Merge pull request #4650
anthony.bilinski (1):
      feat(ui): output instructions when user tries to open a second instance
2017-09-17 11:24:34 +02:00
anthony.bilinski
a601df31da fix(exit): delete heap-based QApplication before exit
Fixes #4648
2017-09-14 00:01:38 -07:00
anthony.bilinski
48d65c269a feat(ui): output instructions when user tries to open a second instance
Fixes #3483
2017-09-14 00:00:38 -07:00
Vincas Dargis
32b97cb927 fix(platform): handle terminating POSIX signals
Add PosixSignalNotifier utility class to covert POSIX signals to
Qt signals and allow qTox to quit appropriately on Linux, FreeBSD
and macOS.

Might protect from data corruption bugs when application is being
terminated during I/O.

Fixes: #4470
2017-09-09 17:19:51 +03:00
Diadlo
0b5b3fcf1a
fix(main): Use correct way to handle application quit
Handle apllication aboutToQuit signal
2017-06-22 10:22:18 +03:00
Diadlo
9908c7473b
refactor(main): Use application pointer 2017-06-22 10:22:18 +03:00
sudden6
a3b234e6dd
chore(formatting): run clang-format 2017-06-01 09:50:59 +02:00
Diadlo
c2f82f7808
fix(IPC): Add update profileId in to IPC
Fix #4384
2017-05-24 19:41:54 +03:00
Diadlo
5d117e6af8
refactor: Remove getCompactLayout from GenericChatroomWidget 2017-05-04 20:31:56 +03:00
Diadlo
7d3020cba3
refactor(IPC): Remove IPC singlton 2017-05-04 20:31:56 +03:00
Yuri
e597d391fc fix(includes): Added missing #include <ctime>
time(3) requires this include. Found when qTox failed to build on the FreeBSD due to the missing include.
2017-04-11 00:04:48 -07:00
Zetok Zalbavar
bfd47733c2
fix(UI): actually load bundled Unicode font as soon as possible
Hopefully this fixes an issue with ugly fonts that started happening
some time ago for Windows & FreeBSD users.
2017-03-12 12:14:25 +00:00
sudden6
ffd7d0e93e
chore(font): update default font and add its license
Also add a warning message, if the font wasn't loaded.
2017-02-26 20:54:20 +01:00
Zetok Zalbavar
80f5de31b3
style: reformat current C++ codebase using clang-format 2017-02-26 11:52:45 +00:00
tux3
c75ee8a661
fix: Various IPC event handling and related bugs on startup
Fixes #1926 : When an IPC event was processed locally, if the window was closed before the core could start, the event handler would be forever stuck in the background waiting for the core to start. We fix this by substituting QApplication::quit() by a Nexus::quit() function and a Nexus::isRunning() function, which gives us a condition for exiting blocking processEvents() loops. We cannot simply use QApplication::quit(), because this function has no effect before the start of the event loop.

The problem was further exacerbated by the Tox URI event handler being (incorrectly) blocking. The IPC owner would block in this event handler, and the sender of the event would give up waiting and process the event itself a second time, potentially triggering the first bug. We fix the event handlers accordingly to be (mostly) non-blocking.

Also fixes a related deadlock between ~Core and ~Profile in the case of an early exit
2017-02-17 17:18:52 +01:00
Zetok Zalbavar
d4ac13dbf4
revert: "refactor: Added to include path and exclude it from all includes"
Revert needed, since otherwise there is no way to do automatic sorting
of includes.
Also reverted change to the docs, as leaving it would make incorrect
docs.

In case of conflicts, includes were sorted according to the coding
standards from #3839.

This reverts commit b4a9f04f92.
This reverts commit 5921122960.
2016-12-29 16:10:53 +00:00
Zetok Zalbavar
7b60a5dd36
chore: explicitly mention that copyright belongs to qTox contributors 2016-11-29 11:12:06 +00:00
Diadlo
b4a9f04f92
refactor: Added to include path and exclude it from all includes 2016-11-28 23:28:42 +03:00
iphydf
153ebb339d
chore: Shorten source file names in log messages.
In cmake builds, `__FILE__` is the absolute file path. In qmake, it's a
relative path. For in-tree qmake builds, it would be `"src/..."`, for
out of tree, it could be `"../src/..."` or `"../qTox/src/..."` or any
other relative path depending on how qTox was built. This change
normalises them to paths based in src.
2016-09-04 18:29:30 +01:00
Diadlo
72780e6c7a
docs(todo): Changed todo format 2016-08-19 00:20:24 +03:00
Diadlo
31d8e7eef0
docs: Replaced simple on doxygen tag 2016-08-19 00:20:23 +03:00
Diadlo
4018c0041b
feat(main): Changed time in logs on UTC.
Fix #3554.
2016-07-26 14:06:48 +03:00
Diadlo
104c7c6e0c
style(main): Small style fixes 2016-06-28 22:42:49 +03:00
Diadlo
29ab61efdf
fix(main): Closing file before removing
Fix #3440
2016-06-26 21:13:39 +03:00
sudden6
e0961722bf
Merge pull request #3302
Diadlo (1):
      refactor(android): All android code is removed
2016-05-15 13:37:55 +02:00
Diadlo
6ed16db5fd
refactor(android): All android code is removed
Closes #3168.
2016-05-15 02:42:20 +03:00
initramfs
8e9a065f16
refactor(hidpi): enable HiDPI support if Qt supports it
Previously HiDPI support is conditionally enabled based on compilation
parameters as well as environmental variables which makes binary
distribution difficult. This commit automatically enables runtime DPI
scaling if Qt supports it (version 5.6 and beyond).
2016-05-04 18:31:24 +08:00
Diadlo
64a19d3419
fix(main): Added check sodium_init result 2016-04-20 22:53:22 +03:00
sudden6
de4878909d
fix: Close logfile only after the disabling logging to file
This fixes a segfault when closing qTox, because the logfile was closed
before the last message was written.
2016-03-26 13:49:51 +01:00
sudden6
a7ffc08cdb
fix: Make logMessageHandler thread-safe
Make use of mutexes and atomic operations to make logging thread-safe
and deadlock free.
2016-03-26 11:00:22 +01:00
sudden6
c1e2a3c5b6
fix: Deadlock while rotating logs
based on #2974
fixes #2920
2016-03-26 11:00:22 +01:00
Michał Šrajer
3227f6ea5b fix #2976
on linux logs goes to ~/.cache/...
and screenshots goes to ~/.local/share/...
2016-02-28 15:36:28 +01:00
tux3
ff6725fe2a
Fix #2194: Create QApplication before logging 2016-01-21 02:41:13 +01:00
Andrew Morgan
3015be87ff Removed inconsistancies with logFileDir and handle error on removal of old log file. 2016-01-20 17:22:43 -08:00
Andrew Morgan
93991368c6 Added log rotation functionality.
This is to prevent log files from ever exceeding a limit of 1MB each. Only the current and one other log file are kept, giving hopefully enough history for any neccessary debugging.
2016-01-20 16:32:24 -08:00
Rowen Stipe
27fda2e579 Added basic migration compatibility code.
This code works if the ~/Library/Application Support/Tox directory does
not already exist.
2016-01-19 06:36:15 -05:00
rku
056a77d4dd Cleaned up all the ipc/startup code:
* Removed duplicate code of ipc event sending
 * Removed duplicate code of profile loading
 * Fixed bug where activating existing instance still started new instance of qtox asking to select a profile
 * IPC messages are now profile-aware and are sent to instance that runs specified profile in -p flag or to ipc owner if -p is not specified.

If -p flag is specified ipc events will be send to instance which runs specified profile. If instance using that profile does not run - new qTox instance will be started. This works with password-protected profiles too - new instance will handle "uri" or "save" events after accepting user password.
2015-12-22 14:59:55 +02:00
tux3
dc5cd990b6
Remove some Windows debug code 2015-12-10 21:07:38 +01:00
tux3
d67e6c7449 Improve integrated update code to match the rest
We're doing updates over HTTP until we get a domain name and a cert, but
this is not at all an issue since updates are still signed and checked.
2015-12-10 18:46:07 +01:00
tux3
2d7c65efbb
Fix IPC::~IPC use after free of static log file 2015-10-23 19:21:37 +02:00
agilob
7d8e0644ce remove dependency injection from systemtrayicon
as it was used as experiment only
fix compilation warning about unchecked switch case
2015-10-23 16:21:05 +02:00
agilob
7117083e86
Merge remote-tracking branch 'origin/new_video_view' 2015-10-18 20:55:01 +01:00
Nils Fenner
3f38ba3896
initialize IPC on first call 2015-10-11 23:09:29 +02:00
Nils Fenner
6644622301
fix #2360
The valid result prevents starting a second instance.
2015-10-11 23:08:49 +02:00
Nils Fenner
7cf1f564b0
remove dead code 2015-10-11 23:07:37 +02:00
agilob
266c0fb989
Merge branch TheSpiritXIII:video 2015-10-10 13:49:30 +01:00
TheSpiritXIII
814bd922ca Video: Group audio view avatars 2015-08-18 13:40:11 -04:00
Spagy
00efbf9e79 Remove call to ProfileLocker::clearAllLocks()
The call to ProfileLocker::clearAllLocks() was unnecessary and could remove locks from other programs
2015-07-17 15:49:15 +01:00
tux3
9e55c77849
Better freeing of CameraSource 2015-06-26 19:04:53 +02:00
tux3
bfd3086ca6
Fix #1840 2015-06-09 01:45:30 +02:00
Zetok Zalbavar
67e9aeec63
Fix incorrect copyright headers
The qTox Project is not associated with the Tox Project in any way, with the
exception of "qTox" using the Tox Projet's "toxcore" collection of libraries.
In particular, the Tox Projet does not own copyright over the qTox Project's
"qTox" collection of software, source code, and assets.
The qTox Project's assets are under the sole copyright of the qTox
contributors, and no partiular rights are granted to the Tox Project.
2015-06-06 14:51:28 +01:00
tux3
20f254651d
Reorganize files 2015-06-06 01:44:47 +02:00
tux3
c9202f6794
Asynchronous settings saving 2015-06-05 18:01:50 +02:00
tux3
1ded562d9d
Clean Settings interface 2015-06-05 16:24:47 +02:00
tux3
276f411ad2
Implment auto-login 2015-06-05 15:24:02 +02:00
tux3
192d9a5e29
Cleanup main() a bit 2015-06-05 12:44:22 +02:00
tux3
6bf0317e3e
Translate all GUI, not just Widget 2015-06-05 12:26:04 +02:00
tux3
5f94f33117 Use profile password for all encryption 2015-06-04 21:34:13 +02:00
tux3
42a7efb053 Implement the -p option 2015-06-04 21:34:13 +02:00
tux3
032c561e62 Make Nexus own and start the LoginScreen
And start implementing some of the required methods to make Core, LoginScreen and Nexus use Profile
2015-06-04 21:34:12 +02:00
tux3
d53b426750 Replace OpenCV with FFmpeg 2015-06-03 02:10:52 +02:00
tux3
76cbaf18f1
Fix incorrect copyright headers
The qTox Project is not associated with the Tox Project in any ways, with the exception of "qTox" using the Tox Projet's "toxcore" collection of libraries.
In particular, the Tox Projet does not own copyright over the qTox Project's "qTox" collection of software, source code, and assets.
The qTox Project's assets are under the sole copyright of the qTox contributors, and no partiular rights are granted to the Tox Project.
2015-05-12 04:12:53 +02:00
sudden6
e3eb4ea503 remove useless code
opencv uses exceptions for error handling
2015-05-11 15:40:38 +02:00
sudden6
1506a9a30e Change log messages to fit new log format 2015-05-11 15:37:56 +02:00
sudden6
0e91d59454 rework the logging and debug output 2015-05-11 15:37:56 +02:00
Ilya Kowalewski
6c8b130a25 Redesign draft for settings pane and proper UX for Mac 2015-05-11 00:41:34 +03:00
tux3
e79d40e356
Merge branch 'pr1446'
Conflicts:
	src/chatlog/chatlog.cpp
	src/chatlog/content/filetransferwidget.cpp
	src/core.cpp
	src/core/coreencryption.cpp
	src/toxdns.cpp
	src/widget/form/chatform.cpp
	src/widget/form/genericchatform.cpp
	src/widget/friendwidget.cpp
	src/widget/widget.cpp
2015-05-07 22:00:50 +02:00
tux3
694933d24b
Correctly rename and lock imported profiles
Imported profiles are legact 'data' and 'tox_save' files
2015-04-24 20:45:26 +02:00
tux3
05b6f1985d
Allow to start multiple instances with -p
Starting a new instance with the -p option will force it to start a new instance with the given profile instead of bringing an eventual existing instance to the foreground

Two instances can not run with the same profiles, the profile locking code will ensure that. A user who likes to live dangerously could manually delete the lock to force two instances on the same profile, but such an hypothetical user would be asking for it.

If a qTox instance starts and becomes owner of the IPC shared memory on its first try, it considers itself the only running freshly-started instance, and deletes any possibly stale lock before starting up. This should be fine in the vast majority of cases, but if an existing qTox instance freezes for a long enough time to lose ownership of the IPC and a new instance is started without first killing the frozen one, the frozen instance's lock will be deleted as stale by the new one. If the frozen instance subsequentely unfreezes, it will be running on a profile for which it doesn't have a lock, which could cause trouble. This is an intentionaly allowed edge case, the alternative being a stale lock staying forever until removed manually. A potential solution not yet implemented would be to check that the lock is still actually present before attempting any write.
2015-04-24 19:43:39 +02:00
tux3
bbf75aefb9
Profile locking 2015-04-24 18:53:19 +02:00
Zetok Zalbavar
f3aa3073b0
Fix coding style and add copyright header
* added copyright header to src/platform/statusnotifier/enums.c
* 'switch(' → 'switch ('
* use Allman style

----
for / if / while / switch () {
 ↓
for / if / while / switch ()
{
----

----
for / if / while ()
{
    1_line;
}
 ↓
for / if / while ()
    1_line;

----

----
for / if / while ()
    1_line;
line_out_of_loop;
 ↓
for / if / while ()
    1_line;

line_out_of_loop;
----
2015-03-21 08:59:28 +00:00
novist
a8cd541cb5 IPC improvements
* Removed waitUntilProcessed() because waitUntilAccepted() fits the job. They were nearly identical too so decreased code duplication
* Global events are set as processed only by instance that accepts them. Solves issue where global event would be consumed by first instance that saw it even if that instance ignored that event
* Fixed bug where running qtox instance would not properly exit after sending window activation event that was accepted by already running instance
2015-03-19 12:06:05 +02:00
tux3
68afc8f623 Change OpenCV error mode
Should help with #1240
2015-03-06 00:35:46 +01:00
Dubslow
dd3087fc3d
Merge branch 'pr1341' 2015-03-05 12:20:30 -06:00
Sean
7fb6acdafc Fixes some OS X installer bugs 2015-03-05 10:16:59 -08:00
tux3
641fc8c776
Catch OpenCV errors
Should help with #1240
2015-03-04 22:13:42 +01:00
tux3
96d39f6565
Merge branch 'pr1331' 2015-03-04 21:31:25 +01:00
Sean
dddf5b73d4 Political correctness 2015-03-04 12:29:12 -08:00
Sean
f19b6230ed High DPI scaling
High DPI scaling

Update qtox.pro

Oh right not everyone uses Qt5.4

Why did I use the web ui
2015-03-04 19:52:50 +01:00
Sean
f51cd63cff Almost forgot mv is harmful
Note that this is required because Qt applications cannot run under setuid(0) as qtox_sudo sets

.

Fix quitting
2015-03-04 08:26:16 -08:00
Sean
fbd0cc59b6 OS X applications folder support 2015-03-04 08:26:16 -08:00
tux3
1a1debf167
Merge branch 'pr1243' 2015-02-25 15:55:32 +01:00
tux3
1883b4e25e Implementing creating a toxme address 2015-02-25 00:40:44 +01:00
Tux3 / Mlkj / !Lev.uXFMLA
217ca20085 Start implementing toxme.se support 2015-02-25 00:37:21 +01:00
novist
41fd5ab558 Allow only main (IPC owner) instance to save global settings 2015-02-22 16:33:15 +02:00
novist
886ee3ff10 Fixes #840 2015-02-22 16:31:54 +02:00
novist
9523484bfe Reworked IPC class:
* Simpler design
  * Suport for named events
  * Support for checking if events were handled
  * Support for sending events to specific application instance
2015-02-22 16:31:48 +02:00
Tux3 / Mlkj / !Lev.uXFMLA
2e7c73dcb0
Cleanup before returning from main 2015-02-06 19:38:08 +01:00
tux3/mlkj
46bba3f2f1 Initial Android support
We create a GUI class to abstract common GUI needs (showing a message box, asking a question, ...) from the actual GUI backend.

We also create a Nexus class to manage the startup and lifetime of our main systems (Core, GUI, ...) instead of delegating that to Widget.

Eventually, Widget will only be in charge of the Desktop GUI and AndroidGUI of the mobile GUI. Nexus will overview the system and GUI will provide a clean platform-independant interface.
2015-02-06 12:28:49 +01:00
Tux3 / Mlkj / !Lev.uXFMLA
2225fcaf9d
Initial android support 2015-02-06 01:27:07 +01:00
Dubslow
a572ccff27
Merge branch 'encryption' into master
Conflicts:
	src/core.cpp
	src/historykeeper.h
2015-02-03 10:21:59 -06:00
Tux3 / Mlkj / !Lev.uXFMLA
8ccd3bb3bf
Fix spurious quitting when dialog closed and in tray 2015-02-01 00:03:42 +01:00
Dubslow
56784d2a78
Fix #1064 2015-01-29 10:26:21 -06:00
Tux3 / Mlkj / !Lev.uXFMLA
19ad3ac7f1
Change -P command line option to -p
Flags should be lowercase by default for consistency
2015-01-28 21:40:09 +01:00
Tux3 / Mlkj / !Lev.uXFMLA
7b7ff9c474
Exit if nonnexistant profile passed to -P 2015-01-28 21:33:41 +01:00
Tux3 / Mlkj / !Lev.uXFMLA
edef42ec69
Use YYYY-MM-DD date format in logs, fixes #1060 2015-01-28 13:43:32 +01:00
Dubslow
29cc9e1b7d
Merge branch 'encryption' into master
Conflicts:
	src/main.cpp
2015-01-23 01:51:39 -06:00
Dubslow
f0c3ca1c9e
check -P option for invalid profiles
closes #977
2015-01-20 02:24:25 -06:00
Dubslow
7aa52ff754
Fix profile settings issue from command line, default unencrypt history is Cancel 2015-01-19 22:23:13 -06:00
Zetok Zalbavar
e0993a72f6
Style corrections
'if()' → 'if ()'
'for()' → 'for ()'
2014-12-11 18:05:52 +00:00