1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 23:59:37 +02:00

10 Commits

Author SHA1 Message Date
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
863be98ccd AUP3: Deal with a couple of delays
The first was due to a left over bit of code in Compact and has
been removed.

The second is in SaveProject. This one can't be removed, so a
progress dialog was added.
2020-07-29 09:00:38 -05:00
Leland Lucius
d4627f0daf AUP3: Reduce crash exposure when compacting
There's still the possibility if a crash happens at just the
right time that the project will be named "<project>_compact_back"
so we should probably look for it during startup.

This also changes all "Vacuum" references to "compact".
2020-07-28 23:25:50 -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
3f68d0f1cd Fix inverted assertion condition 2020-07-23 11:32:20 -04:00
Paul Licameli
5bc2cb991f Do debug check for closing of DB before Project destruction safely...
... It wasn't safe, on some platforms, because the sequence of destruction
of ProjectFileIO and ConnectionPtr is unspecified.  It is safer that
ConnectionPtr just checks itself, not that ProjectFileIO fetches it again.
2020-07-23 11:06:50 -04: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 127696879dcc5ca687ec50a4ccef7acbed563926

* 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