Update license
authorIceyer <me@iceyer.net>
Wed, 13 Sep 2017 05:07:08 +0000 (13:07 +0800)
committerIceyer <me@iceyer.net>
Thu, 14 Sep 2017 07:22:38 +0000 (15:22 +0800)
Change-Id: I9a1ab231ee77a9f040a94a07d2c06e6c7a1b0ecd

46 files changed:
src/base/dobject.cpp
src/base/dobject.h
src/base/dsingleton.h
src/base/private/dobject_p.h
src/dtkcore_global.h
src/filesystem/dbasefilewatcher.cpp
src/filesystem/dbasefilewatcher.h
src/filesystem/dfilesystemwatcher.h
src/filesystem/dfilesystemwatcher_linux.cpp
src/filesystem/dfilesystemwatcher_win.cpp
src/filesystem/dfilewatcher.cpp
src/filesystem/dfilewatcher.h
src/filesystem/dfilewatchermanager.cpp
src/filesystem/dfilewatchermanager.h
src/filesystem/dpathbuf.h
src/filesystem/dstandardpaths.cpp
src/filesystem/dstandardpaths.h
src/filesystem/private/dbasefilewatcher_p.h
src/filesystem/private/dfilesystemwatcher_linux_p.h
src/filesystem/private/dfilesystemwatcher_win_p.h
src/log/AbstractAppender.cpp
src/log/CuteLogger_global.h
src/log/LogManager.cpp
src/log/LogManager.h
src/log/RollingFileAppender.cpp
src/log/RollingFileAppender.h
src/settings/backend/qsettingbackend.cpp
src/settings/backend/qsettingbackend.h
src/settings/dsettings.cpp
src/settings/dsettings.h
src/settings/dsettingsbackend.h
src/settings/dsettingsgroup.cpp
src/settings/dsettingsgroup.h
src/settings/dsettingsoption.cpp
src/settings/dsettingsoption.h
src/util/dutil.h
tests/dutiltester.cpp
tests/dutiltester.h
tests/main.cpp
tests/singletontester.cpp
tests/singletontester.h
tool/license/license-updater.py [new file with mode: 0644]
tool/main.cpp [deleted file]
tool/settings/main.cpp [new file with mode: 0644]
tool/settings/settings.pro [new file with mode: 0644]
tool/tool.pro

index 8e28a6ebca3853c982b3203cd289ee8997f9463d..5f3cd7f050d2a7e959ea1db75a7eaa7a0b60e378 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2015 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2015 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dobject.h"
 #include "private/dobject_p.h"
index 4757bd0f7bd16ff45e1eaa04d11626f0903ae70e..a06e071fc03fa41f5028f8152df51773c9231d0c 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2015 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2015 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DOBJECT_H
 #define DOBJECT_H
index f9f9ebb2d5d3d430e78a2722213992fb2f36a896..6c0e37e2e96715364b511ede5a8343e7de0605d6 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DSINGLETON_H
 #define DSINGLETON_H
index 9a431ccaa6b4dc0ecc61266177130ce898b03cc8..f6b209ee3a0f9af9bcdb8b329f47b071ee50e543 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2015 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2015 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DOBJECT_P_H
 #define DOBJECT_P_H
index 06ae06ebb1e37ab291bb49399c84ec73b564429c..ecb3ec47f3b7f3b560453e6188db9d475dec7885 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #pragma once
 
index c2ca79fd3802ebd0289bfb6f90b9d81f65e8ffc2..9de11720f766b11188be5783fd5b9df115431c3f 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dbasefilewatcher.h"
 #include "private/dbasefilewatcher_p.h"
index 2d0b37bef16cd76b34317834fd4b6caf0d975081..4ebd4e8d6ec54ff43e0b4be59f6875fd9b55f45c 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DBASEFILEWATCHER_H
 #define DBASEFILEWATCHER_H
index 39cdda5c60dfcd745b363a84c7771fa281ebc5ed..939fccc46443f66097a5f7bb7d590f01387c4d4c 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DFILESYSTEMWATCHER_H
 #define DFILESYSTEMWATCHER_H
index aa1f637a01f4598256a5ec284ff30e5e724c0650..17fcac37434eca5ae393f5c55b7a740f7f4690dc 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dfilesystemwatcher.h"
 #include "private/dfilesystemwatcher_linux_p.h"
index 69bd597067a4b7f96212ae76cc54dc7cbd397b1a..e1e5fc5188ee3b7b890336bd55706cc5776205ee 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dfilesystemwatcher.h"
 #include "private/dfilesystemwatcher_win_p.h"
index 1e478724de00abb971e347044f6166f8baf0363f..0becdd410b6f36ec57bbe87721b946093d4de4b5 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dfilewatcher.h"
 #include "private/dbasefilewatcher_p.h"
index 7dba2eca5086c81f2d840e2c32410baa6248a56b..fb44d0127433da598cb8e1aee547d7f24011862e 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DFILEWATCHER_H
 #define DFILEWATCHER_H
index e5b60cfd47811b6419ce8af792a38ee0d4d11d2e..f6e0676291833fa32d0bf2b79da86d6e18104ed7 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dfilewatchermanager.h"
 #include "dfilewatcher.h"
index f6e3e5575b5a03d5dde5e7c3952c4a6f79042222..8b5c828a44ab75170ef0d77115448c2271eebc71 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DFILEWATCHERMANAGER_H
 #define DFILEWATCHERMANAGER_H
index 4b384024deecc3eff1e1019fa691e5e218a74f44..499dc11d9c86513b75d6bf5c2e96110f6a6374af 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #pragma once
 
index cbfca54bdb1dff46f387af7e244afeb07a633434..bad435d7d2e181484473ab934b815a752f3f1d37 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dstandardpaths.h"
 
index 740a6474bb11a1d4c2f6860b48c2fe04f6e616e2..c749cae09cdfd0f7ec2de7ee8ce203196460a444 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DTK_CORE_FILESYSTEM_DSTANDARDPATHS_H
 #define DTK_CORE_FILESYSTEM_DSTANDARDPATHS_H
index 9304e15a9ef5560bb300da677e8d39d1ff8f19af..3eaae3e6aaed269cd96fee914b71274c2ddcf2eb 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DBASEFILEWATCHER_P_H
 #define DBASEFILEWATCHER_P_H
index ceb409b699470f9cdb8b21bd0c1eb33c27ebf8c5..a880a8a002f0d599eb1a9fa7fa30a8e7dc7f4613 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DFILESYSTEMWATCHER_P_H
 #define DFILESYSTEMWATCHER_P_H
index 52d8af5aef1c55bfc34f71a344805776ca3c859d..67311b6615da217200a82d9940cdd9ab7042ba77 100644 (file)
@@ -1,11 +1,20 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #ifndef DFILESYSTEMWATCHER_WIN_P_H
 #define DFILESYSTEMWATCHER_WIN_P_H
 
index 2dfee02282f43e486f4e3eba6b5b3f0869274948..a4fe3405a10b0aef50cd8c4918736248a37e2f14 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
  // Local
 #include "AbstractAppender.h"
 
index 411ae6ea3af32e3cfdc0bd1b8845b31b08ef6911..ffa2ad898dbd877ec8b1b57a368b7f9e35e3e5b6 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef CUTELOGGER_GLOBAL_H
 #define CUTELOGGER_GLOBAL_H
index cbbac76a6c98db5e04226e9ffae09cdf5d3b3c48..2eb54984f8610c5dbee44cbd7905deea2feefaa1 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #include "LogManager.h"
 #include <Logger.h>
 #include <ConsoleAppender.h>
index bdd6e353108a7616a53d165f564e047eac0cdffa..85fa6fccdd3b2636ce879dbcd1118d2268ce2dbd 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef LOGMANAGER_H
 #define LOGMANAGER_H
index 1f9a4af4df0474a679a5fac87ee73fb94996bd10..ce1a65b034b9c3a0d2848f4c193b98128cd3d6ff 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #include <QDateTime>
 #include <QDir>
 #include <QFileInfo>
index c7c9a8ee75127651e5f9f27be5e8374b0d1424a2..a93ded26fe4ea937ecb2ba19bcd4a338c14ad518 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef ROLLINGFILEAPPENDER_H
 #define ROLLINGFILEAPPENDER_H
index 67bf9410b93d7b088ffaffcb714d2a7c93a1ed0e..6893c47f19ee4031fa5175c2e6a7da5419cc6d13 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "qsettingbackend.h"
 
index 4f61d13c519690c90b28af388deac8608227e5e5..643d05eade8f77c8c9ad3a35f0f3be01bf1fd7b1 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #pragma once
 
index a463aa128234d32b39852a8f41b1962a0b4c3947..9ce4c1d127a80b23dc03ab27f60e1f8321819c98 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dsettings.h"
 
index e984e4ab44982163c387a6fd2bf08b40d40e46c2..4353106ec61580b93e63b87da9fa96a840b9df31 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #pragma once
 
index de9f67f8bdf71c3f1105d8079d62b61cbdff5d7f..19b5552664625f7b06e7042a2992abb576e09d64 100644 (file)
@@ -1,12 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
-
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #pragma once
 
index 6c24e49fea5e4b71c00abee1424b35315fbe9de1..da68b43b6ab3e6c0c4cdf325b1fa8950ee1f825a 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dsettingsgroup.h"
 
index 68449c972869f76ba39046e942c53d6856f4876c..b39229b5f7bea82038d3f1b2e40b169966eec602 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #pragma once
 
index d0581af81451d9ca4fd2f29c61a17a38827321be..2410c6f02d1af79bfef0e29536b2220038604549 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dsettingsoption.h"
 
index f055b546cb4bd1f1450fb40718abb1f27114caa8..346923d3f956659445a6a6bfc86aaf7a6c75b4e0 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #pragma once
 
index 376e9fc0dce90bb8887b55dfbd9149453c558f8b..f1ca0cbf27ac340d48452d0096f097f4ee905e73 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #pragma once
 
index c4ae4d01d1bbe823d8240452b85655f3edfbd14a..a4fce037d8e0a8561116ee54a4b84a3f15276692 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "dutiltester.h"
 
index b785b3d2d48b846e49de50e67a00017ba779aabc..2fddddf33974b2c2bca035fd23e65d1599a19719 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef DUTILTESTER_H
 #define DUTILTESTER_H
index 0abaecb54c89c24efefa9655b6b790bc3b473ad6..0c1f4c2b1112e19416907e363bbe03626d1d4810 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2017 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include <QtTest/QtTest>
 
index 406aa82f5b87acf0f7e07d3a0ca2e8a3b8b4991c..87c17cbf04c04a0d5a1fc4a976f9c4d92586140f 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #include "singletontester.h"
 
index ab8ba0dccfe14040d79c689dc31dfd9848be0664..8f13e870fc19086a31efe66bdc630cd4752fd347 100644 (file)
@@ -1,11 +1,19 @@
-/**
- * Copyright (C) 2016 Deepin Technology Co., Ltd.
+/*
+ * Copyright (C) 2016 ~ 2017 Deepin Technology Co., Ltd.
  *
- * This program is free software; you can redistribute it and/or modify
+ * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- **/
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #pragma once
 
diff --git a/tool/license/license-updater.py b/tool/license/license-updater.py
new file mode 100644 (file)
index 0000000..6b78009
--- /dev/null
@@ -0,0 +1,318 @@
+import fnmatch
+import os
+import argparse
+import re
+import datetime
+
+
+license_header = '''/*\n'''
+license_empty = ''' *\n'''
+license_copyright_prifix = ''' * Copyright (C) {0}\n'''
+license_copyright_indent = ''' *               {0}\n'''
+license_author_prifix = ''' * Author:     {0}\n'''
+license_person_indent = ''' *             {0}\n'''
+license_maintainer_prifix = ''' * Maintainer: {0}\n'''
+license_tail = ''' */\n\n'''
+default_license_body = ''' * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+
+def isInt(value):
+    try:
+        int(value)
+        return True
+    except ValueError:
+        return False
+
+
+class Copyright:
+    def __init__(self, line):
+        self.year_start = datetime.datetime.now().year
+        self.year_end = datetime.datetime.now().year
+
+        if "copyright" in line.lower():
+            line = line[re.search("copyright", line, re.IGNORECASE).end():]
+
+        copyright_sysbol = re.search("\(.\)", line, re.IGNORECASE)
+        if copyright_sysbol is not None:
+            copyright_brace_end_pos = copyright_sysbol.end()
+            line = line[copyright_brace_end_pos:]
+            pass
+
+        if re.search("[0-9]+", line) is not None:
+            year_start_pos = re.search("[0-9]+", line).start()
+            year_start_end_pos = re.search("[0-9]+", line).end()
+            self.year_start = int(line[year_start_pos: year_start_end_pos])
+            line = line[year_start_end_pos:]
+
+        if re.search("[0-9]+", line) is not None:
+            year_end_pos = re.search("[0-9]+", line).start()
+            year_end_end_pos = re.search("[0-9]+", line).end()
+            if re.search("~", line) is not None:
+                year_spilt = re.search("~", line).start()
+                if (year_spilt < year_end_pos):
+                    self.year_end = int(line[year_end_pos: year_end_end_pos])
+                    line = line[year_end_end_pos:]
+
+        self.name = line.strip()
+
+    def string(self):
+        return "{0} ~ {1} {2}".format(
+            self.year_start,
+            self.year_end,
+            self.name)
+
+
+class Person:
+    def __init__(self, line):
+        if re.search(":", line, re.IGNORECASE) is not None:
+            split_end = re.search(":", line).end()
+            line = line[split_end:]
+
+        self.name = line.strip()
+
+
+def filter_files(file_list, ext_list):
+    for file in file_list:
+        for ext in ext_list:
+            if fnmatch.fnmatch(file, ext):
+                yield file
+                break
+
+
+class Source:
+    def __init__(self, filename):
+        self.body = []
+        self.copyrights = {}
+        self.authors = {}
+        self.maintainers = {}
+        self.filename = filename
+        self.is_deepin_copyright = False
+        self.update_license(filename)
+
+    def update_license(self, filename):
+        find_license_start = False
+        find_license_end = False
+
+        parse_copyright_start = False
+        parse_author_start = False
+        parse_maintainer_start = False
+
+        with open(filename, "r") as f:
+            print("process:", filename)
+            for line in f:
+                if line.strip().startswith("/*") and (0 == len(self.body)):
+                    find_license_start = True
+
+                if (0 != len(self.body)) or (0 != len(line.strip())):
+                    self.body.append(line)
+
+                if "*/" in line.strip() and find_license_start:
+                    if not find_license_end:
+                        # print("clean body")
+                        self.body = []
+                    find_license_end = True
+
+                if find_license_start and not find_license_end:
+                    if re.search("(\*)+", line):
+                        # remove *****
+                        line = line[re.search("(\*)+", line).end():]
+
+                    if "copyright" in line.lower():
+                        parse_copyright_start = True
+                        parse_author_start = False
+                        parse_maintainer_start = False
+                    if "author" in line.lower():
+                        parse_copyright_start = False
+                        parse_author_start = True
+                        parse_maintainer_start = False
+                    if "maintainer" in line.lower():
+                        parse_copyright_start = False
+                        parse_author_start = False
+                        parse_maintainer_start = True
+                    if 0 == len(line.strip()):
+                        parse_copyright_start = False
+                        parse_author_start = False
+                        parse_maintainer_start = False
+
+                    if parse_copyright_start:
+                        cr = Copyright(line)
+                        self.copyrights[cr.name] = cr
+
+                    if parse_author_start:
+                        p = Person(line)
+                        self.authors[p.name] = p
+
+                    if parse_maintainer_start:
+                        p = Person(line)
+                        self.maintainers[p.name] = p
+
+    def fix_deepin(self):
+        new_cr = {}
+        self.is_deepin_copyright = False
+        for k, cr in self.copyrights.items():
+            if "deepin" in cr.name.lower():
+                cr.name = "Deepin Technology Co., Ltd."
+                self.is_deepin_copyright = True
+            new_cr[cr.name] = cr
+        self.copyrights = new_cr
+
+    def dump(self):
+        for cr in self.copyrights:
+            print(cr.year_start, cr.year_end, cr.name)
+        for a in self.authors:
+            print(a.name)
+        for a in self.maintainers:
+            print(a.name)
+        print("body size:", len(self.body))
+
+    def save(self):
+        wf = open(self.filename, 'w')
+        wf.write(license_header)
+
+        if len(self.copyrights):
+            write_first = False
+            for k, cr in self.copyrights.items():
+                if not write_first:
+                    wf.write(license_copyright_prifix.format(cr.string()))
+                    write_first = True
+                else:
+                    wf.write(license_copyright_indent.format(cr.string()))
+            wf.write(license_empty)
+
+        if len(self.authors):
+            write_first = False
+            for k, author in self.authors.items():
+                if not write_first:
+                    wf.write(license_author_prifix.format(author.name))
+                    write_first = True
+                else:
+                    wf.write(license_person_indent.format(author.name))
+            wf.write(license_empty)
+
+        if len(self.maintainers):
+            write_first = False
+            for k, maintainer in self.maintainers.items():
+                if not write_first:
+                    wf.write(license_maintainer_prifix.format(maintainer.name))
+                    write_first = True
+                else:
+                    wf.write(license_person_indent.format(maintainer.name))
+            wf.write(license_empty)
+
+        wf.write(default_license_body)
+        wf.write(license_tail)
+
+        for l in self.body:
+            wf.write(l)
+        wf.close()
+
+
+def parse_args():
+    parser = argparse.ArgumentParser()
+    parser.add_argument('--authors', help='''authors split by ":". For example:\n
+        "Iceyer <me@iceyer.net>:Li He <lihe@deepin.com>"''')
+    parser.add_argument('--maintainers', help='''maintainers split by ":". For example: \n
+        "Iceyer <me@iceyer.net>:Li He <lihe@deepin.com>"''')
+    parser.add_argument('--copyrights', help='''copyrights split by ":". For example: \n
+        "2011 ~ 2017 Deepin Technology Co., Ltd.:2011 ~ 2017 Li He"''')
+    parser.add_argument('--fix-deepin',  dest='fixdeepin',
+                        action='store_const', const=True, default=False, help='''
+                        fix deein copyrights''')
+    parser.add_argument('dir',  help='''
+                        source code dir''')
+
+    args = parser.parse_args()
+    return args
+
+
+def match_files(dir):
+    EXTENSIONS = "*.cpp", "*.c", "*.h", "*.go"
+    matches = []
+    for root, dirnames, filenames in os.walk(dir):
+        for filename in filter_files(filenames, EXTENSIONS):
+            matches.append(os.path.join(root, filename))
+    return matches
+
+
+def test():
+    cr = Copyright("Copyright (C)  Deepin Technology Co., Ltd.")
+    print(cr.year_start, cr.year_end, cr.name)
+    cr = Copyright("Copyright (C) 2007 Deepin Technology Co., Ltd.")
+    print(cr.year_start, cr.year_end, cr.name)
+    cr = Copyright("Copyright (C) 2007 ~ 2016 Deepin Technology Co., Ltd.")
+    print(cr.year_start, cr.year_end, cr.name)
+
+    p = Person("Author:     Wang Yong <wangyong@deepin.com>")
+    print(p.name)
+    p = Person("    Wang Yong <wangyong@deepin.com>")
+    print(p.name)
+
+
+def get_authors(args):
+    authors = []
+    if args.authors is not None:
+        for a in args.authors.split(":"):
+            authors.append(Person(a))
+    return authors
+
+
+def get_copyrights(args):
+    copyrights = []
+    if args.copyrights is not None:
+        for a in args.copyrights.split(":"):
+            copyrights.append(Copyright(a))
+    return copyrights
+
+
+def get_maintainers(args):
+    maintainers = []
+    if args.maintainers is not None:
+        for a in args.maintainers.split(":"):
+            maintainers.append(Copyright(a))
+    return maintainers
+
+
+def main():
+    args = parse_args()
+    authors = get_authors(args)
+    copyrights = get_copyrights(args)
+    maintainers = get_maintainers(args)
+    fixdeepin = args.fixdeepin
+    files = match_files(args.dir)
+
+    for filename in files:
+        s = Source(filename)
+        # s.dump()
+        if fixdeepin:
+            s.fix_deepin()
+        if not s.is_deepin_copyright and 0 != len(s.copyrights):
+            continue
+
+        if 0 == len(s.copyrights):
+            for cr in copyrights:
+                s.copyrights[cr.name] = cr
+
+        for p in authors:
+            s.authors[p.name] = p
+
+        for p in maintainers:
+            s.maintainers[p.name] = p
+
+        s.save()
+        # s.dump()
+
+
+if __name__ == "__main__":
+    main()
diff --git a/tool/main.cpp b/tool/main.cpp
deleted file mode 100644 (file)
index ba27490..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#include <QCoreApplication>
-
-#include <iostream>
-
-#include <QDebug>
-#include <QFile>
-#include <QCommandLineParser>
-
-#include "settings/dsettings.h"
-#include "settings/dsettingsgroup.h"
-#include "settings/dsettingsoption.h"
-
-
-static QString CppTemplate =
-    "#include <DSettings>\n"
-    "\n"
-    "void GenerateSettingTranslate()\n"
-    "{\n"
-    "%1"
-    "}\n";
-
-int main(int argc, char *argv[])
-{
-    QCoreApplication app(argc, argv);
-    app.setOrganizationName("deepin");
-    app.setApplicationName("dtk-settings-tools");
-    app.setApplicationVersion("0.1.2");
-
-    QCommandLineParser parser;
-    parser.setApplicationDescription("Generate translation of dtksetting.");
-    parser.addHelpOption();
-    parser.addVersionOption();
-
-    QCommandLineOption outputFileArg(QStringList() << "o" << "output",
-                                     QCoreApplication::tr("Output cpp file"),
-                                     "cpp-file");
-    parser.addOption(outputFileArg);
-    parser.addPositionalArgument("json-file", QCoreApplication::tr("Json file description config"));
-    parser.process(app);
-
-    if (0 == (parser.optionNames().length() + parser.positionalArguments().length())) {
-        parser.showHelp(0);
-    }
-
-    auto jsonFile = parser.positionalArguments().value(0);
-    auto settings = Dtk::Core::DSettings::fromJsonFile(jsonFile);
-
-    QMap<QString, QString> transtaleMaps;
-
-//    qDebug() << settings->groupKeys();
-    for (QString groupKey : settings->groupKeys()) {
-        auto codeKey = QString(groupKey).replace(".", "_");
-        auto group = settings->group(groupKey);
-//        qDebug() << codeKey << group->name();
-        // add Name
-        if (!group->name().isEmpty()) {
-            transtaleMaps.insert("group_" + codeKey + "Name", group->name());
-        }
-
-        // TODO: only two level
-        for (auto childGroup : group->childGroups()) {
-            auto codeKey = childGroup->key().replace(".", "_");
-//            qDebug() << codeKey << childGroup->name();
-            // add Name
-            if (!childGroup->name().isEmpty()) {
-                transtaleMaps.insert("group_" + codeKey + "Name", childGroup->name());
-            }
-        }
-    }
-
-    for (QString key : settings->keys()) {
-        auto codeKey = QString(key).replace(".", "_");
-        auto opt = settings->option(key);
-
-        // add Name
-        if (!opt->name().isEmpty()) {
-            transtaleMaps.insert(codeKey + "Name", opt->name());
-        }
-
-        // add text
-        if (!opt->data("text").toString().isEmpty()) {
-            transtaleMaps.insert(codeKey + "Text", opt->data("text").toString());
-        }
-
-        // add items
-        if (!opt->data("items").toStringList().isEmpty()) {
-            auto items = opt->data("items").toStringList();
-            for (int i = 0; i < items.length(); ++i) {
-                transtaleMaps.insert(codeKey + QString("Text%1").arg(i), items.value(i));
-            }
-        }
-    }
-
-    transtaleMaps.insert("reset_button_name", "Restore Defaults");
-
-    QString cppCode;
-    for (auto key : transtaleMaps.keys()) {
-        auto stringCode = QString("    auto %1 = QObject::tr(\"%2\");\n").arg(key).arg(transtaleMaps.value(key));
-        cppCode.append(stringCode);
-    }
-
-    QString outputCpp = CppTemplate.arg(cppCode);
-
-    if (parser.isSet(outputFileArg)) {
-        QFile outputFile(parser.value(outputFileArg));
-        if (!outputFile.open(QIODevice::WriteOnly)) {
-            qCritical() << "can not open output file!";
-            exit(1);
-        }
-        outputFile.write(outputCpp.toUtf8());
-        outputFile.close();
-    } else {
-        std::cout << outputCpp.toStdString();
-    }
-    return 0;
-}
-
diff --git a/tool/settings/main.cpp b/tool/settings/main.cpp
new file mode 100644 (file)
index 0000000..b84b417
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <QCoreApplication>
+
+#include <iostream>
+
+#include <QDebug>
+#include <QFile>
+#include <QCommandLineParser>
+
+#include "settings/dsettings.h"
+#include "settings/dsettingsgroup.h"
+#include "settings/dsettingsoption.h"
+
+
+static QString CppTemplate =
+    "#include <DSettings>\n"
+    "\n"
+    "void GenerateSettingTranslate()\n"
+    "{\n"
+    "%1"
+    "}\n";
+
+int main(int argc, char *argv[])
+{
+    QCoreApplication app(argc, argv);
+    app.setOrganizationName("deepin");
+    app.setApplicationName("dtk-settings-tools");
+    app.setApplicationVersion("0.1.2");
+
+    QCommandLineParser parser;
+    parser.setApplicationDescription("Generate translation of dtksetting.");
+    parser.addHelpOption();
+    parser.addVersionOption();
+
+    QCommandLineOption outputFileArg(QStringList() << "o" << "output",
+                                     QCoreApplication::tr("Output cpp file"),
+                                     "cpp-file");
+    parser.addOption(outputFileArg);
+    parser.addPositionalArgument("json-file", QCoreApplication::tr("Json file description config"));
+    parser.process(app);
+
+    if (0 == (parser.optionNames().length() + parser.positionalArguments().length())) {
+        parser.showHelp(0);
+    }
+
+    auto jsonFile = parser.positionalArguments().value(0);
+    auto settings = Dtk::Core::DSettings::fromJsonFile(jsonFile);
+
+    QMap<QString, QString> transtaleMaps;
+
+//    qDebug() << settings->groupKeys();
+    for (QString groupKey : settings->groupKeys()) {
+        auto codeKey = QString(groupKey).replace(".", "_");
+        auto group = settings->group(groupKey);
+//        qDebug() << codeKey << group->name();
+        // add Name
+        if (!group->name().isEmpty()) {
+            transtaleMaps.insert("group_" + codeKey + "Name", group->name());
+        }
+
+        // TODO: only two level
+        for (auto childGroup : group->childGroups()) {
+            auto codeKey = childGroup->key().replace(".", "_");
+//            qDebug() << codeKey << childGroup->name();
+            // add Name
+            if (!childGroup->name().isEmpty()) {
+                transtaleMaps.insert("group_" + codeKey + "Name", childGroup->name());
+            }
+        }
+    }
+
+    for (QString key : settings->keys()) {
+        auto codeKey = QString(key).replace(".", "_");
+        auto opt = settings->option(key);
+
+        // add Name
+        if (!opt->name().isEmpty()) {
+            transtaleMaps.insert(codeKey + "Name", opt->name());
+        }
+
+        // add text
+        if (!opt->data("text").toString().isEmpty()) {
+            transtaleMaps.insert(codeKey + "Text", opt->data("text").toString());
+        }
+
+        // add items
+        if (!opt->data("items").toStringList().isEmpty()) {
+            auto items = opt->data("items").toStringList();
+            for (int i = 0; i < items.length(); ++i) {
+                transtaleMaps.insert(codeKey + QString("Text%1").arg(i), items.value(i));
+            }
+        }
+    }
+
+    transtaleMaps.insert("reset_button_name", "Restore Defaults");
+
+    QString cppCode;
+    for (auto key : transtaleMaps.keys()) {
+        auto stringCode = QString("    auto %1 = QObject::tr(\"%2\");\n").arg(key).arg(transtaleMaps.value(key));
+        cppCode.append(stringCode);
+    }
+
+    QString outputCpp = CppTemplate.arg(cppCode);
+
+    if (parser.isSet(outputFileArg)) {
+        QFile outputFile(parser.value(outputFileArg));
+        if (!outputFile.open(QIODevice::WriteOnly)) {
+            qCritical() << "can not open output file!";
+            exit(1);
+        }
+        outputFile.write(outputCpp.toUtf8());
+        outputFile.close();
+    } else {
+        std::cout << outputCpp.toStdString();
+    }
+    return 0;
+}
+
diff --git a/tool/settings/settings.pro b/tool/settings/settings.pro
new file mode 100644 (file)
index 0000000..fb6e4cd
--- /dev/null
@@ -0,0 +1,28 @@
+QT += core
+QT -= gui
+
+CONFIG += c++11
+
+TARGET = dtk-settings-tool
+CONFIG += console link_pkgconfig
+CONFIG -= app_bundle
+
+TEMPLATE = app
+
+SOURCES += main.cpp
+
+isEmpty(PREFIX){
+    PREFIX = /usr
+}
+
+binary.files += $${OUT_PWD}/dtk-settings-tool
+binary.path = $${PREFIX}/lib/dtk2
+
+INSTALLS += binary
+
+win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../src/release/ -ldtkcore
+else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../src/debug/ -ldtkcore
+else:unix: LIBS += -L$$OUT_PWD/../../src/ -ldtkcore
+
+INCLUDEPATH += $$PWD/../../src
+DEPENDPATH += $$PWD/../../src
index 7c8cb4faaab54e8552407a922bc5472247cd99e5..aeaeb47f3360eea89d2971b1b8b3db493022e983 100644 (file)
@@ -1,28 +1,6 @@
-QT += core
-QT -= gui
+TEMPLATE = subdirs
 
-CONFIG += c++11
+CONFIG += ordered
 
-TARGET = dtk-settings-tool
-CONFIG += console link_pkgconfig
-CONFIG -= app_bundle
-
-TEMPLATE = app
-
-SOURCES += main.cpp
-
-isEmpty(PREFIX){
-    PREFIX = /usr
-}
-
-binary.files += $${OUT_PWD}/dtk-settings-tool
-binary.path = $${PREFIX}/lib/dtk2
-
-INSTALLS += binary
-
-win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../src/release/ -ldtkcore
-else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../src/debug/ -ldtkcore
-else:unix: LIBS += -L$$OUT_PWD/../src/ -ldtkcore
-
-INCLUDEPATH += $$PWD/../src
-DEPENDPATH += $$PWD/../src
+SUBDIRS +=   \
+    settings \