Commit Graph

464 Commits

Author SHA1 Message Date
Jonathan Thomas
56b1126c21 Merge pull request #302 from ferdnyc/svg-path-check
QtImageReader: Safer ReSVG file extension checks
2019-10-22 17:30:35 -05:00
Frank Dana
febc2fbc7d Merge pull request #333 from ferdnyc/Version-impl
Version information: Separate implementation, add pythonic touches
2019-10-11 21:57:38 -04:00
Frank Dana
ca885d59e0 Merge pull request #315 from ferdnyc/exception-default-args
Exceptions: Make (most) file_path args optional
2019-10-11 21:46:43 -04:00
Frank Dana
335c0cba1f Merge pull request #303 from ferdnyc/use-std-stoll
Use std::stoll to convert JSON values
2019-10-02 01:29:59 -04:00
FeRD (Frank Dana)
c422f4f245 Separate GetVersion impl, make Pythonic 2019-09-21 01:43:30 -04:00
FeRD (Frank Dana)
462f0b7930 Exception.h: Document parameters 2019-08-27 20:48:56 -04:00
FeRD (Frank Dana)
49749d52c2 Exceptions.h: Optional file_path args
Makes nearly all `file_path` arguments optional, unless the exception deals
with file operations specifically (e.g. InvalidFile still requires file_path)
2019-08-27 15:46:31 -04:00
SuslikV
16ca3aef32 Fix return type mismatch 2019-08-24 11:36:21 +02:00
FeRD (Frank Dana)
5b4bfa8e41 Remove mentions of nonexistent InitFileInfo() 2019-08-12 12:00:18 -04:00
FeRD (Frank Dana)
141e6ba61e Use std::stoll to convert JSON values 2019-08-10 11:31:08 -04:00
FeRD (Frank Dana)
76fc1ef571 QtImageReader: Safer ReSVG file extension checks
This changes the type of the private `path` variable to QString
internally (which we were converting it to for a bunch of operations
anyway), and uses QString's more robust string-manipulation and
comparison methods to ensure that only filenames that _end in_ an
.svg/.svgz extension (case-insensitively) are recognized as SVG files.

Previously, a filename such as "Title.svg.png" would be interpreted as
an SVG file.

The change in QString type is purely internal, all of the class's
interfaces remain the same, and accept `std::string path`. We simply
convert it to/from QString at opposite places in the code, now.
2019-08-09 20:50:28 -04:00
SuslikV
59fe417141 Unify indentation of the code strings 2019-08-08 16:46:07 +03:00
FeRD (Frank Dana)
5fb9755353 Fix truncated output filenames in FFmpegWriter 2019-08-06 11:59:55 -04:00
Jonathan Thomas
0449b5b4eb Merge pull request #276 from ferdnyc/swig-Wall
SWIG: Warnings cleanup
2019-07-29 17:31:10 -05:00
Jonathan Thomas
12fce8040f Merge pull request #266 from ferdnyc/zmq-default-params
Default values for ZMQ logging calls
2019-07-29 16:30:22 -05:00
Jonathan Thomas
5f331e24df Merge pull request #265 from ferdnyc/catch-by-reference
Exceptions: catch-by-reference and other cleanup
2019-07-29 16:27:40 -05:00
Jonathan Thomas
f3354d997a Merge pull request #264 from ferdnyc/inline-av_err2str
FFmpegUtilities: inline av_make_error_string
2019-07-29 16:25:37 -05:00
Frank Dana
47d69779b6 Fix override syntax
Overrides go at the end of the declaration. Qt also has the `Q_DECL_OVERRIDE` preprocessor define, which expands to `override` only when building the code using C++11 or higher.
2019-07-16 12:28:00 -04:00
nick black
4a1d133da8 PlayerDemo: declare keyPressEvent() override 2019-07-16 10:37:45 -04:00
FeRD (Frank Dana)
0ac3720023 SWIG: Warnings cleanup
* Remove a SWIG pragma from Frame.h (gcc warns on it)
* Place the equivalent %warnfilter in the openshot.i files
* Set openshot.i PROPERTY GENERATED_COMPILE_OPTIONS with flags to
  disable warning spew in generated SWIG code, if -Wall is used

(Also, remove 'using namespace std' from Frame.h, and add std::
prefixes to necessary variables.)
2019-07-12 13:28:47 -04:00
Frank Dana
86e610bfc8 Fix parameter documentation for brightness
The range was listed as 0 – 100, but implemented as -1 – +1. Edited documentation to reflect reality.

Reported by @jeffski like a year and a half ago.
Fixes #71
2019-07-10 04:48:31 -04:00
FeRD (Frank Dana)
e1ffe0762f ZmqLogger.h: Correct default values for optional params 2019-07-03 15:24:45 -04:00
FeRD (Frank Dana)
75c9565f31 ZmqLogger.h: Remove using namespace std; add prefixes 2019-07-03 14:07:36 -04:00
FeRD (Frank Dana)
2dc2fffa45 ZmqLogger: default AppendDebugMethod()'s extra params
Give the AppendDebugMethod() declaration a set of default values for
all parameters after the first. (It uses `""` and `-1.0`, which are
what callers were passing in anyway.) This way, callers have the
_option_ to eschew this kind of thing:
```
ZmqLogger::Instance()->AppendDebugMethod("Message", "start", start,
"length", length, "", -1, "", -1, "", -1, "", -1);
```
instead, they can use the functionally equivalent:
```
ZmqLogger::Instance()->AppendDebugMethod("Message", "start", start,
"length", length);
```
Passing meaningless args is the compiler's job, not the programmer's.
2019-07-03 14:06:44 -04:00
FeRD (Frank Dana)
80765147b9 Exceptions.h: fixes for noexcept, unused vars, std::
Some fixes for `-Wall`-readiness:
* Removed `using namespace std;` from the header and
  added `std::` prefixes where needed (`std::string`)
* Replaced `throw ()` in declarations with `noexcept`,
  as `throw ()` is [deprecated in c++11][1]
* Several exception classes had a `file_path` member
  variable, despite never using it. Removed the
  unused class member.

[1]:<https://en.cppreference.com/w/cpp/language/noexcept_spec>
2019-07-03 13:12:02 -04:00