|
@@ -0,0 +1,47 @@
|
|
|
|
+# HG changeset patch
|
|
|
|
+# User Bill Gianopoulos <wgianopoulos@gmail.com>
|
|
|
|
+# Date 1697716235 0
|
|
|
|
+Bug 9999999 - Port bug 1859739 to suite.
|
|
|
|
+Bug 1859739 - Give more explicit name to preprocessor function F in migration code.
|
|
|
|
+
|
|
|
|
+diff --git a/suite/components/migration/src/nsSuiteProfileMigratorBase.h b/suite/components/migration/src/nsSuiteProfileMigratorBase.h
|
|
|
|
+--- a/suite/components/migration/src/nsSuiteProfileMigratorBase.h
|
|
|
|
++++ b/suite/components/migration/src/nsSuiteProfileMigratorBase.h
|
|
|
|
+@@ -24,23 +24,33 @@ struct fileTransactionEntry {
|
|
|
|
+ nsString newName; // only valid if the file should be renamed after
|
|
|
|
+ // getting copied
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ #define FILE_NAME_PREFS "prefs.js"
|
|
|
|
+ #define FILE_NAME_JUNKTRAINING "training.dat"
|
|
|
|
+ #define FILE_NAME_VIRTUALFOLDERS "virtualFolders.dat"
|
|
|
|
+
|
|
|
|
+-#define F(a) nsSuiteProfileMigratorBase::a
|
|
|
|
++#define TRANSFORMFUNCTION(a) nsSuiteProfileMigratorBase::a
|
|
|
|
+
|
|
|
|
+ #define MAKEPREFTRANSFORM(pref, newpref, getmethod, setmethod) \
|
|
|
|
+- { pref, newpref, F(Get##getmethod), F(Set##setmethod), false, { -1 } }
|
|
|
|
++ { \
|
|
|
|
++ pref, newpref, TRANSFORMFUNCTION(Get##getmethod), \
|
|
|
|
++ TRANSFORMFUNCTION(Set##setmethod), false, { \
|
|
|
|
++ -1 \
|
|
|
|
++ } \
|
|
|
|
++ }
|
|
|
|
+
|
|
|
|
+-#define MAKESAMETYPEPREFTRANSFORM(pref, method) \
|
|
|
|
+- { pref, 0, F(Get##method), F(Set##method), false, { -1 } }
|
|
|
|
++#define MAKESAMETYPEPREFTRANSFORM(pref, method) \
|
|
|
|
++ { \
|
|
|
|
++ pref, 0, TRANSFORMFUNCTION(Get##method), TRANSFORMFUNCTION(Set##method), \
|
|
|
|
++ false, { \
|
|
|
|
++ -1 \
|
|
|
|
++ } \
|
|
|
|
++ }
|
|
|
|
+
|
|
|
|
+ class nsSuiteProfileMigratorBase : public nsISuiteProfileMigrator,
|
|
|
|
+ public nsITimerCallback,
|
|
|
|
+ public nsINamed
|
|
|
|
+ {
|
|
|
|
+ public:
|
|
|
|
+ NS_DECL_ISUPPORTS
|
|
|
|
+ NS_DECL_NSITIMERCALLBACK
|