~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kplato/libs/kernel/kptconfigbase.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
namespace KPlato
28
28
{
29
29
 
30
 
class KPLATOKERNEL_EXPORT ConfigBase 
 
30
class KPLATOKERNEL_EXPORT ConfigBase : public QObject
31
31
{
 
32
    Q_OBJECT
32
33
public:
33
34
    ConfigBase();
34
35
    virtual ~ConfigBase();
35
36
 
36
37
    void setReadWrite(bool readWrite) { m_readWrite = readWrite; }
37
 
    Task &taskDefaults() { setDefaultValues( *m_taskDefaults ); return *m_taskDefaults; }
 
38
    Task &taskDefaults() const {
 
39
        const_cast<ConfigBase*>( this )->setDefaultValues( *m_taskDefaults );
 
40
        return *m_taskDefaults;
 
41
    }
38
42
    void setTaskDefaults( Task * );
39
43
 
40
44
    virtual void setDefaultValues( Task & ) {}
44
48
 
45
49
    
46
50
    void setLocale( KLocale *locale );
47
 
    const KLocale *locale() const { return m_locale; }
48
 
    KLocale *locale() { return m_locale; }
 
51
    const KLocale *locale() const;
 
52
    KLocale *locale();
49
53
 
50
54
protected:
51
55
    bool m_readWrite;