Commit Graph

22 Commits

Author SHA1 Message Date
Paul Licameli f7d9602a42 TranslatableString.h does not include Identifier.h 2021-05-27 09:51:32 -04:00
Paul Licameli 406b23cae7 More uses of AUDACITY_DLL_API...
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
2021-05-10 10:46:55 -04:00
James Crook 8fbbcccc6c Restructure SQLITE_OK tests 2021-04-19 12:59:36 +01:00
Paul Licameli 42f01f9188 Fix dangling pointer in lambda capture for checkpoint thread 2021-04-10 21:52:51 -04:00
Leland Lucius b67c71688b A bit more checkpoint thread cleanup
Just some additional error checking and moves the close of the db
to the main thread where it was opened.  Not required, but...
2021-04-08 15:18:32 -05:00
Paul Licameli 40d3a36296
Bug2700: intermittent failure to open project database... (#799)
... Logging data from the wild shows that the SELECT query in
ProjectFileIO::CheckVersion() returned SQLITE_BUSY sometimes.

A plausible explanation is that the concurrently starting checkpoint thread
was sometimes creating a new connection simultaneously.

Instead, serialize the creation of the two connections in the main thread and
pass the second one ready made into the checkpoint thread.
2021-04-08 13:56:06 -05:00
Leland Lucius d9260df634 Some additional error checking and logging 2021-04-04 14:18:05 -05:00
Leland Lucius 392a060389 Bug 2700 - "Failed to open the project database" 2021-04-01 01:13:15 -05:00
Dmitry Vedenko f1395ff621 Bug 2718 - improve the error message when opening a project in a read-only directory. 2021-03-29 18:40:40 +01:00
Leland Lucius 9b67c5aeec Bug 2688 - Bad saves with Unicode project filenames 2021-03-07 16:27:16 -06:00
Leland Lucius 53f7cacdb2 Bug 2673 - Win: Mixer Board problem on Windows - causes crash 2021-02-22 19:27:02 -06:00
freddii 534359de6c
Fix minor typos (#720)
Co-authored-by: freddii <https://freddii@github.com>
2021-01-12 11:56:09 +00:00
Paul Licameli 6944ba564c Use events to break dependency cycle introduced at 3978e8c 2020-11-25 12:24:21 -05:00
Paul Licameli 5ebfe4670c Bug2596: Error dialogs opening unreadable project should not be blank 2020-11-24 12:43:00 -05:00
Paul Licameli 495b4afe46 Doxygen comments for TransactionScope 2020-09-06 17:04:47 -04:00
Paul Licameli e7b3c2b99f Cut and paste TransactionScope into DBConnection.* files 2020-09-05 14:44:34 -04:00
Paul Licameli eb7e67623e Demote error message storage from ProjectFileIO into DBConnection 2020-09-05 14:32:39 -04:00
Paul Licameli 22c00fab03 Fix misspelled file name in comments and add Doxygen 2020-08-27 22:18:27 -04:00
Paul Licameli 2389b191f6 Bug2513: Disk exhaustion error message should be as was pre-Unitary 2020-08-26 16:56:03 -04:00
Leland Lucius 8943494f8a AUP3: Better space usage calculations
Several improvements in determining how much actual disk space a
sampleblock uses. This allows us to provide how much space will
be recovered when using File -> Compact Project.

In addition, the History window now provides better space estimates.
2020-08-01 04:25:42 -05:00
Leland Lucius f3293fd102 AUP3: Adjust checkpoint thread controls
To better reflect how they are used...simple flags
2020-07-27 23:15:38 -05:00
Paul Licameli a3fcd611b5
Dependency cleanup (#627)
* DBConnection doesn't use ProjectFileIO or need friendship...

... Instead, it is given its own weak_ptr to the project

* Demote the bypass flag into DBConnection...

... So SqliteSampleBlock needs ProjectFileIO only to get the DBConnection

* Accessor functions for the connection objects for SqliteSampleBlock

* Another level of indirection to get to the DBConnection object...

... The document holds the unique_ptr to DBConnection in an attached object;
later we want the SqliteSampleBlockFactory to locate the same pointer without
using ProjectFileIO

* SqliteSampleBlock and its factory don't use class ProjectFileIO...

... Instead they share a pointer to the pointer to the current DBConnection.

This means they no longer know how to invoke the lazy opening of that
connection.

So just require that this be done before any operations on blocks happen.  If
it hasn't, throw and let the application recover.

* ProjectFileIO no longer needs weak_ptr to Project for safety...

... so eliminate much ugliness from 127696879d

* Move DBConnection to new files...

... And SqliteSampleBlock does not depend on ProjectFileIO.

* SampleBlock.h doesn't need ClientData.h

* Function ProjectFileIO::Conn() isn't needed
2020-07-23 01:04:46 -05:00